Skip to content

update CI

update CI #13

Workflow file for this run

name: Continuous Integration
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true
env:
JAVA_VERSION: '17'
jobs:
build-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Build and test
run: cd rust-module && cargo build --verbose && cargo test --verbose
- name: Check code formatting
run: cd rust-module && cargo fmt -- --check
- name: Check lint
run: cd rust-module && cargo clippy -- -D warnings
build-scala-native:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Set up SBT
uses: coursier/setup-action@v1
with:
jvm: temurin:${{env.JAVA_VERSION}}
apps: sbt
- name: Check format
run: sbt checkFormat
- name: Scalafix Lint
run: sbt scalafixLint
- uses: ./.github/actions/linux-setup-env
- name: Build and compile Rust lib
run: cd rust-module && cargo build --release
- name: Build Scala native binary
run: sbt nativeLink
- name: Runt Tests
run: |
export LD_LIBRARY_PATH=${PWD}/rust-module/target/release/:$LD_LIBRARY_PATH
sbt test