diff --git a/.github/workflows/esy.yml b/.github/workflows/esy.yml index 0251e32..7bb6064 100644 --- a/.github/workflows/esy.yml +++ b/.github/workflows/esy.yml @@ -2,7 +2,7 @@ name: Esy on: push: branches: [main] - pull_request: + # pull_request: # This will cancel previous runs when a branch or PR is updated concurrency: diff --git a/.github/workflows/opam.yml b/.github/workflows/opam.yml index 2464296..0419a69 100644 --- a/.github/workflows/opam.yml +++ b/.github/workflows/opam.yml @@ -18,7 +18,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - ocaml-compiler: [4.14.1, 5.3.0] + ocaml-compiler: [5.3.0] steps: - name: Setup node.js @@ -32,29 +32,40 @@ jobs: with: submodules: true + # We use esy-bash as a build environment to keep the cygwin environment the same as esy + - name: Checkout esy-bash + uses: actions/checkout@v4 + with: + repository: esy/esy-bash + path: .tools/esy-bash + + - name: Setup esy-bash environment + working-directory: .tools/esy-bash + run: | + npm i -g esy@0.9.2 + npm install + npm run build-exe + npm run build-cygwin + npm link + - name: Setup OCaml ${{ matrix.ocaml-compiler }} - uses: ocaml/setup-ocaml@4dd53a587b9836a35604fec9601e606ff42145bc # v3.4.1 + uses: ocaml/setup-ocaml@93303b622b2522e4411e295f9e77411a24912ac7 # v3.9.0 with: ocaml-compiler: ${{ matrix.ocaml-compiler }} - name: Inspect depexts run: | - opam exec -- which cmake - opam exec -- which gcc - opam exec -- which g++ - opam exec -- gcc --version - opam exec -- g++ --version + esy-bash opam exec -- which cmake + esy-bash opam exec -- which gcc + esy-bash opam exec -- which g++ + esy-bash opam exec -- gcc --version + esy-bash opam exec -- g++ --version - name: Install local dependencies - run: opam install . --deps-only --with-test - - # Cygwin's cmake hangs during compiler detection with libuv1 1.53.0 - - name: Pin Cygwin libuv1 - if: runner.os == 'Windows' - run: Start-Process -Wait -NoNewWindow D:\.opam\.cygwin\setup-x86_64.exe '-q -R D:\cygwin -P libuv1=1.52.1-1' + run: esy-bash opam install . --deps-only --with-test - name: Build project - run: opam exec -- dune build + run: esy-bash opam exec -- dune build - name: Run tests - run: opam exec -- dune runtest --display=short + run: esy-bash opam exec -- dune runtest --display=short