Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add scala lifter compilation #104

Merged
merged 6 commits into from
Sep 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.