diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 52de67dd..e746ce1f 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -60,7 +60,7 @@ jobs: - run: dune build @offline-coverage -j4 offline-cpp: - runs-on: ubuntu-24.04 + runs-on: ubuntu-24.04 # for recent llvm version steps: - uses: actions/checkout@v4 @@ -81,3 +81,25 @@ jobs: - name: 'syntax check generated C++ lifter' run: meson compile -C offlineASL-cpp/build + + offline-scala: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v25 + - run: echo 'preparing nix shell environment' + + - uses: coursier/cache-action@v6 + - uses: coursier/setup-action@v1 + with: + jvm: adoptium:1.17 + apps: mill + + - run: dune build --profile release + - run: mkdir -p offlineASL-scala/lifter/src/generated + - run: echo ':gen A64 .* scala true offlineASL-scala/lifter/src/generated' | OCAMLRUNPARAM=b dune exec asli + + - run: 'cd offlineASL-scala && mill lifter.assembly' + - run: 'cd offlineASL-scala && mill main.run --help' diff --git a/offlineASL-scala/readme.md b/offlineASL-scala/readme.md index 6246252c..742c22b2 100644 --- a/offlineASL-scala/readme.md +++ b/offlineASL-scala/readme.md @@ -1,9 +1,13 @@ -Build standalone Scala lifter interface +Build standalone Scala lifter interface. +Requires Mill (e.g. installed by Coursier). Run in parent directory: +```bash +mkdir -p offlineASL-scala/lifter/src/generated +echo ':gen A64 aarch64.+ scala true offlineASL-scala/lifter/src/generated' | dune exec asli +cd offlineASL-scala +mill lifter.assembly +mill main.run --opcode 0x8b031041 ``` -# (in parent direictory) -~ echo ':gen A64 aarch64.+ scala true scalaOfflineASL/lifter/generated' | dune exec asli -~ cd scalaOfflineASL -~ ./mill lifter.assembly -~ ./mill main.run -``` +This should compile successfully. However, the last command will fail since +the default instruction-building interface simply throws "not implemented" +on all methods.