Skip to content

Commit

Permalink
Merge pull request #419 from ocsigen/update-gha
Browse files Browse the repository at this point in the history
Update GitHub Actions workflow
  • Loading branch information
smorimoto authored May 10, 2024
2 parents 1de0401 + b1a1b3f commit 70af3eb
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 55 deletions.
56 changes: 23 additions & 33 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,50 @@ name: CI

on:
push:
branches: [main,v2]
branches:
- main
- v2
pull_request:
branches: [main,v2]
branches:
- main
- v2
workflow_dispatch:

jobs:
build-jsoo:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
dotnet:
- 6.0.x
node-version:
- 20.x
ocaml-compiler:
- 4.08.x
- 4.12.x
- 4.14.x
- 5.0.x
- "4.08"
- "4.12"
- "4.14"
- "5.0"
- "5.1"

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

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

- name: Use .NET ${{ matrix.dotnet }}
- name: Set-up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: 6.0.x

- name: Use Node.js ${{ matrix.node-version }}
- name: Set-up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22
cache: yarn

- name: Use OCaml ${{ matrix.ocaml-compiler }}
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
dune-cache: true
allow-prerelease-opam: true

- name: Install .NET Dependencies
run: |
Expand All @@ -59,31 +59,21 @@ jobs:
run: bash fake TestJsoo

build-res:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
dotnet:
- 6.0.x
node-version:
- 20.x

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

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

- name: Use .NET ${{ matrix.dotnet }}
- name: Set-up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: 6.0.x

- name: Use Node.js ${{ matrix.node-version }}
- name: Set-up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22
cache: yarn

- name: Install .NET Dependencies
Expand Down
35 changes: 13 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,39 @@ name: Publish

on:
release:
types: [published]
types:
- published

jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
dotnet:
- 6.0.x
node-version:
- 20.x
ocaml-compiler:
- 5.0.x

runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest

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

- name: Use .NET ${{ matrix.dotnet }}
- name: Set-up .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ matrix.dotnet }}
dotnet-version: 6.0.x

- name: Use Node.js ${{ matrix.node-version }}
- name: Set-up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 22
cache: yarn

- name: Use OCaml ${{ matrix.ocaml-compiler }}
- name: Set-up OCaml
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
ocaml-compiler: "5.1"
dune-cache: true
allow-prerelease-opam: true

- name: Install .NET Dependencies
run: dotnet restore ts2ocaml.sln
| dotnet tool restore
run: |
dotnet restore ts2ocaml.sln
dotnet tool restore
- name: Install OCaml Dependencies
run: opam install . --deps-only
Expand Down

0 comments on commit 70af3eb

Please sign in to comment.