Skip to content

Commit

Permalink
ci: add scala lifter compilation (#104)
Browse files Browse the repository at this point in the history
* ci: add scala lifter compilation

* use coursier/setup-action

* java 17

* add note about notimplemented [no ci]

* fix readme steps and remove sbt
  • Loading branch information
katrinafyi authored Sep 5, 2024
1 parent 6fcda77 commit 5eaf73c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 8 deletions.
24 changes: 23 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
18 changes: 11 additions & 7 deletions offlineASL-scala/readme.md
Original file line number Diff line number Diff line change
@@ -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.

0 comments on commit 5eaf73c

Please sign in to comment.