Skip to content

Commit

Permalink
chore: bump CI actions versions (#2806)
Browse files Browse the repository at this point in the history
* chore: bump CI actions versions

* so setup-ocaml@v3 breaks building on older ocaml versions

* fix variable name
  • Loading branch information
anmonteiro authored Oct 20, 2024
1 parent 54b4a47 commit 9ec35aa
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 34 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/esy-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,16 @@ jobs:

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Install esy
run: npm install -g [email protected].3-beta.3
run: npm install -g [email protected].4

- name: Restore global cache (~/.esy/source)
id: global-cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ~/.esy/source
key: esy-source-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }}
Expand All @@ -53,7 +52,7 @@ jobs:

- name: Load dependencies cache
id: deps-cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: |
${{ steps.print_esy_cache.outputs.ESY_CACHE }}
Expand Down Expand Up @@ -91,15 +90,15 @@ jobs:
run: esy export-dependencies

- name: Save global cache
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: steps.global-cache.outputs.cache-hit != 'true'
with:
path: ~/.esy/source
key: esy-source-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('esy.lock.json') }}

- name: Save dependencies cache
if: steps.deps-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
uses: actions/cache/save@v4
with:
path: |
${{ steps.print_esy_cache.outputs.ESY_CACHE }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/nix-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v27
- uses: cachix/install-nix-action@v29
with:
extra_nix_config: |
extra-substituters = https://anmonteiro.nix-cache.workers.dev
Expand All @@ -53,7 +53,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: cachix/install-nix-action@v27
- uses: cachix/install-nix-action@v29
with:
extra_nix_config: |
extra-substituters = https://anmonteiro.nix-cache.workers.dev
Expand Down
49 changes: 25 additions & 24 deletions .github/workflows/opam-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,46 +16,47 @@ jobs:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-13
- windows-latest
setup:
- {ocaml-compiler: '4.06.x', os: ubuntu-latest}
- {ocaml-compiler: '4.10.x', os: ubuntu-latest}
- {ocaml-compiler: '4.12.x', os: ubuntu-latest}
- {ocaml-compiler: '4.14.x', os: ubuntu-latest}
- {ocaml-compiler: '4.06.x', os: macos-13}
- {ocaml-compiler: '4.10.x', os: macos-13}
- {ocaml-compiler: '4.12.x', os: macos-13}
- {ocaml-compiler: '4.14.x', os: macos-13}
# looks like setup-ocaml@v3 can only run actions on windows for
# OCaml >= 4.13
# https://github.com/ocaml/setup-ocaml/issues/822#issuecomment-2215525942
- {ocaml-compiler: '4.14.x', os: windows-latest}

ocaml-compiler:
# Please keep the list in sync with the minimal version of OCaml in
# esy.json, reason.esy/reason.opam and rtop.esy/rtop.opam.
- 4.06.x # We support 4.06 because is the one that is used in BuckleScript / ReScript v9
- 4.10.x
- 4.12.x
- 4.14.x

runs-on: ${{ matrix.os }}
runs-on: ${{ matrix.setup.os }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
- name: Use OCaml ${{ matrix.setup.ocaml-compiler }}
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
ocaml-compiler: ${{ matrix.setup.ocaml-compiler }}
opam-pin: false

- name: Load opam cache when not Windows
if: runner.os != 'Windows'
id: opam-cache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: ~/.opam
key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('**.opam') }}
key: opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }}

- name: Load opam cache when Windows
if: runner.os == 'Windows'
id: opam-cache-windows
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4
with:
path: _opam
key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('**.opam') }}
key: opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }}

- name: Install dependencies
run: opam install . --deps-only
Expand All @@ -67,16 +68,16 @@ jobs:
run: opam exec -- dune runtest -p reason,rtop

- name: Save cache when not Windows
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: steps.opam-cache.outputs.cache-hit != 'true' && runner.os != 'Windows'
with:
path: ~/.opam
key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('**.opam') }}
key: opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }}

- name: Save cache when Windows
uses: actions/cache/save@v3
uses: actions/cache/save@v4
if: steps.opam-cache-windows.outputs.cache-hit != 'true' && runner.os == 'Windows'
with:
path: _opam
key: opam-${{ matrix.os }}-${{ matrix.ocaml-compiler }}-${{ hashFiles('**.opam') }}
key: opam-${{ matrix.setup.os }}-${{ matrix.setup.ocaml-compiler }}-${{ hashFiles('**.opam') }}

0 comments on commit 9ec35aa

Please sign in to comment.