Skip to content

Commit

Permalink
WIP try lots of versions
Browse files Browse the repository at this point in the history
  • Loading branch information
liyishuai committed Jul 18, 2024
1 parent a184d4b commit 2b06b6e
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
56 changes: 51 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ jobs:
strategy:
fail-fast: false
matrix:
setup-version:
- v2
- v3
os:
- macos-13
- macos-latest
- ubuntu-latest
- windows-latest
Expand All @@ -30,14 +34,48 @@ jobs:
- 4.11.x
- 4.12.x
- 4.13.x
- 4.14.x
- 5.0.x
- 5.1.x
- 5.2.x
exclude:
- os: macos-13
setup-version: v3 # opam uninstall fails
- os: macos-latest
setup-version: v2
- os: macos-latest
ocaml-version: 4.02.x
- os: macos-latest
ocaml-version: 4.03.x
- os: macos-latest
ocaml-version: 4.04.x
- os: macos-latest
ocaml-version: 4.05.x
- os: macos-latest
ocaml-version: 4.06.x
- os: macos-latest
ocaml-version: 4.07.x
- os: macos-latest
ocaml-version: 4.08.x
- os: macos-latest
ocaml-version: 4.09.x
- os: macos-latest
ocaml-version: 4.11.x

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

env:
SKIP_BUILD: |
camlimages
dose
lilis
rotor
freetds
genprint
hdf5
pa_ppx
pla
setr
SKIP_TEST: |
0install
bisect_ppx
Expand All @@ -53,12 +91,19 @@ jobs:
git config --global init.defaultBranch master
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Use OCaml ${{ matrix.ocaml-version }}
- name: Setup OCaml ${{ matrix.ocaml-version }} with v2
if: matrix.setup-version == 'v2'
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-version }}

- name: Setup OCaml ${{ matrix.ocaml-version }} with v3
if: matrix.setup-version == 'v3'
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-version }}

- name: Install dependencies
run: opam install --deps-only .
Expand All @@ -70,18 +115,19 @@ jobs:
run: opam exec -- make

- name: Upload the build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.ocaml-version }}-cppo.exe
path: _build/default/src/cppo_main.exe
overwrite: true

- name: Build, test, and install package
run: opam install -t .

- name: Test dependants
if: >
(runner.os == 'Linux' && matrix.ocaml-version >= '4.04') ||
(runner.os == 'macOS' && matrix.ocaml-version >= '4.13')
(matrix.ocaml-version >= '4.05') && (matrix.os != 'windows-latest')
shell: bash
run: |
PACKAGES=`opam list -s --color=never --installable --depends-on cppo,cppo_ocamlbuild`
echo "Dependants:" $PACKAGES
Expand Down

0 comments on commit 2b06b6e

Please sign in to comment.