Skip to content

Commit

Permalink
GHA: Run NMAKE in pure Windows builds
Browse files Browse the repository at this point in the history
  • Loading branch information
tleedjarv committed Dec 19, 2024
1 parent 707bb5b commit 1f76f53
Showing 1 changed file with 8 additions and 15 deletions.
23 changes: 8 additions & 15 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ jobs:
outputs PKG_VER PKG_BASENAME PKG_DIR PKG_NAME PKG_suffix
COMPRESS_CMD='tar czf'; case '${{ matrix.job.os }}' in windows-*) COMPRESS_CMD='7z -y a' ;; esac;
outputs COMPRESS_CMD
case '${{ matrix.job.ocaml-version }}' in *msvc*) echo "_MAKE=nmake" >> $GITHUB_ENV ;; *) echo "_MAKE=make" >> $GITHUB_ENV ;; esac
- name: Create/configure any needed build/workspace
shell: bash
Expand Down Expand Up @@ -130,22 +131,15 @@ jobs:
run: |
echo SHELLOPTS=igncr>> %GITHUB_ENV%
- shell: bash
- run: |
opam exec -- ${{ env._MAKE }} tui fsmonitor
# stage
cp "src/unison${{ steps.vars.outputs.EXE_suffix }}" "${{ steps.vars.outputs.PKG_DIR }}/bin" || echo unison${{ steps.vars.outputs.EXE_suffix }} not built
cp "src/unison-fsmonitor${{ steps.vars.outputs.EXE_suffix }}" "${{ steps.vars.outputs.PKG_DIR }}/bin" || echo unison-fsmonitor${{ steps.vars.outputs.EXE_suffix }} not built
env:
LDFLAGS: ${{ matrix.job.static }}
run: |
opam exec -- make tui
opam exec -- make fsmonitor
# stage
# * notes: darwin/macos doesn't build `unison-fsmonitor`
for file in unison unison-fsmonitor ; do
if [ -f "src/${file}${{ steps.vars.outputs.EXE_suffix }}" ]; then
cp "src/${file}${{ steps.vars.outputs.EXE_suffix }}" '${{ steps.vars.outputs.PKG_DIR }}/bin'
echo "'src/${file}${{ steps.vars.outputs.EXE_suffix }}' copied to '${{ steps.vars.outputs.PKG_DIR }}/bin'"
fi
done
- run: opam exec -- make test
- run: opam exec -- ${{ env._MAKE }} test

## There is still code to run tests with old ocaml on Windows.
## That remains intentionally so that someone could turn it on if
Expand Down Expand Up @@ -451,9 +445,8 @@ jobs:
run: opam install lablgtk3 ocamlfind

- if: ${{ !matrix.job.static }} ## unable to build static gtk/gui
shell: bash
run: |
opam exec -- make gui
opam exec -- ${{ env._MAKE }} gui
# stage
cp "src/unison-gui${{ steps.vars.outputs.EXE_suffix }}" "${{ steps.vars.outputs.PKG_DIR }}/bin/"
Expand Down

0 comments on commit 1f76f53

Please sign in to comment.