Skip to content

Commit

Permalink
ci: use nix
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinafyi committed Mar 3, 2024
1 parent 064c257 commit dc4fe4a
Showing 1 changed file with 28 additions and 34 deletions.
62 changes: 28 additions & 34 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,38 +15,32 @@ permissions:
jobs:
test:
runs-on: ubuntu-latest
container:
image: ghcr.io/uq-pac/asli-base:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.github_token }}
defaults:
run:
shell: |
nix develop github:katrinafyi/pac-nix#ocamlPackages_pac_4_09.asli --accept-flake-config --command {0}
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Extract encodings
run: tar xzf encodings.tar.gz

- name: opam install
run: |
eval `opam env`
opam install . --deps-only --with-test
- name: Build
run: |
eval `opam env`
dune build
- name: Test
id: test
run: |
eval `opam env`
export LD_LIBRARY_PATH=`opam config var z3:lib`
./coverage.sh test
- name: Upload new coverage results
if: always()
uses: actions/upload-artifact@v3
with:
name: coverage-output-${{ github.run_id }}
path: ${{ steps.test.outputs.OUTPUT }}
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v25
- uses: cachix/cachix-action@v14
with: { name: pac-nix }
- run: echo 'preparing nix shell environment'

# just in case we aslp adds new dependencies
- uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.09 # must match nix develop's ocaml version!
- run: opam install . --deps-only --with-test

- run: dune build
- run: ./coverage.sh test
id: coverage

- name: Upload new coverage results
if: always()
uses: actions/upload-artifact@v3
with:
name: coverage-output-${{ github.run_id }}
path: ${{ steps.coverage.outputs.OUTPUT }}

0 comments on commit dc4fe4a

Please sign in to comment.