Merge branch 'dev' #43
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
# This workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle | |
name: Kommand Test | |
on: | |
push: | |
branches: [ "main", "dev" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- macos-12 | |
- [self-hosted, macOS, ARM64, aarch64-apple-darwin] | |
- ubuntu-22.04 | |
- [self-hosted, macOS, ARM64, aarch64-unknown-linux-gnu] | |
- windows-latest | |
include: | |
- os: macos-12 | |
target: x86_64-apple-darwin | |
task: macosX64Test | |
- os: [self-hosted, macOS, ARM64, aarch64-apple-darwin] | |
target: aarch64-apple-darwin | |
task: macosArm64Test | |
- os: ubuntu-22.04 | |
target: x86_64-unknown-linux-gnu | |
task: linuxX64Test | |
gcc: true | |
- os: [self-hosted, macOS, ARM64, aarch64-unknown-linux-gnu] | |
target: aarch64-unknown-linux-gnu | |
task: linuxArm64Test | |
cross: true | |
- os: windows-latest | |
target: x86_64-pc-windows-gnu | |
task: mingwX64Test | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Cargo | |
uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: 1.69.0 | |
target: ${{ matrix.target }} | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: '17' | |
distribution: 'zulu' | |
architecture: ${{ matrix.arch }} | |
cache: 'gradle' | |
- if: ${{ matrix.gcc }} | |
name: Set up GCC | |
uses: Dup4/actions-setup-gcc@v1 | |
- name: Set up just | |
uses: extractions/setup-just@v1 | |
- name: Set up Gradle | |
uses: gradle/gradle-build-action@v2 | |
with: | |
gradle-version: '8.2' | |
- name: Test Gradle availability | |
run: gradle build --dry-run | |
- if: ${{ !matrix.gcc }} | |
name: Build kommand-core | |
run: just ${{ matrix.target }} | |
working-directory: ./kommand-core | |
- if: ${{ matrix.gcc }} | |
name: Build kommand-core with GCC | |
run: just workflow ${{ matrix.target }} | |
working-directory: ./kommand-core | |
- if: ${{ !matrix.cross }} | |
name: Test with Gradle | |
run: gradle ${{ matrix.task }} jvmTest | |
- if: ${{ matrix.cross }} | |
name: Test with Docker | |
run: just ${{ matrix.task }} |