fix actions #111
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main pipeline | |
on: [push] | |
jobs: | |
build: | |
strategy: | |
matrix: | |
java: [8, 11, 17, 21] | |
os: | |
- os: ubuntu-latest | |
compiler_install_command: sudo apt install g++ cmake | |
krakatau_install_command: sudo cp ./target/release/krak2 /usr/local/bin/ | |
cc: gcc | |
cxx: g++ | |
- os: macos-latest | |
compiler_install_command: brew install cmake | |
krakatau_install_command: cp ./target/release/krak2 /usr/local/bin/ | |
cc: clang | |
cxx: clang++ | |
- os: windows-latest | |
compiler_install_command: choco install cmake | |
krakatau_install_command: copy ./target/release/krak2.exe C:/Windows | |
prebuild_script: '"C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"' | |
cc: cl | |
cxx: cl | |
runs-on: ${{ matrix.os.os }} | |
name: Run full test suite on JDK ${{ matrix.java }} on ${{ matrix.os.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK ${{ matrix.java }} | |
uses: actions/setup-java@v4 | |
with: | |
java-version: ${{ matrix.java }} | |
distribution: temurin | |
- name: Install Rust toolchain for Krakatau | |
uses: dtolnay/rust-toolchain@stable | |
- name: Setup cache for Rust toolchain | |
uses: Swatinem/rust-cache@v2 | |
- name: Install Krakatau | |
run: | | |
git clone https://github.com/Storyyeller/Krakatau.git | |
cd Krakatau | |
cargo build --release | |
${{ matrix.os.krakatau_install_command }} | |
- name: Install C++ dependencies | |
run: ${{ matrix.os.compiler_install_command }} | |
- name: Build with Gradle | |
run: | | |
${{ matrix.os.prebuild_script }} | |
./gradlew build | |
env: | |
CC: ${{ matrix.os.cc }} | |
CXX: ${{ matrix.os.cxx }} |