Skip to content

Commit

Permalink
ci: add offline c++ lifter syntax checking (#101)
Browse files Browse the repository at this point in the history
* ci: add offline c++ lifter syntax checking

* use ubuntu 24.04 for llvm 17

* allow LLVM 16

* use llvm 17

* install ninja

* ci: only run opam on opam.yml changes
  • Loading branch information
katrinafyi authored Jul 24, 2024
1 parent a19d5ab commit 23b8dca
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/opam.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: Build with opam
on:
push:
branches: [ partial_eval ]
paths: [ '*.opam', '.github/**' ]
paths: [ '*.opam', '.github/workflows/opam.yml' ]
pull_request:
paths: [ '*.opam', '.github/**' ]
paths: [ '*.opam', '.github/workflows/opam.yml' ]
workflow_dispatch:

# only run one instance of this action at a time.
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,26 @@ jobs:
- run: dune build offlineASL -j4

- run: dune build @offline-coverage -j4

offline-cpp:
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v4

- uses: cachix/install-nix-action@v25
- run: echo 'preparing nix shell environment'

- uses: actions/setup-python@v5
with:
python-version: '3.11'

- run: python -m pip install 'meson~=1.4.0' 'ninja'

- run: dune build --profile release
- run: echo ':gen A64 .* cpp' | OCAMLRUNPARAM=b dune exec asli

- run: LLVM_CONFIG=$(which llvm-config-17) offlineASL-cpp/check.py

- name: 'syntax check generated C++ lifter'
run: meson compile -C offlineASL-cpp/build
2 changes: 1 addition & 1 deletion offlineASL-cpp/subprojects/aslp-lifter-llvm/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ project('aslp-lifter-llvm', 'cpp',
default_options : [ 'warning_level=3', 'cpp_std=c++20' ])

version = meson.project_version()
llvm_dep = dependency('llvm', version: ['>=17', '<18'])
llvm_dep = dependency('llvm', version: ['>=16', '<18'])
empty_dep = dependency('', required: false)

lifter_dep = dependency('aslp-lifter', version: version, fallback: ['aslp-lifter', 'gen_dep'])
Expand Down

0 comments on commit 23b8dca

Please sign in to comment.