Archived
Add windows-11-arm runner to build matrix for ARM64 Windows builds. Now building for 5 platforms: - Linux x64 (ubuntu-latest) - Linux ARM64 (ubuntu-24.04-arm) - macOS ARM64 (macos-latest) - Windows x64 (windows-latest) - Windows ARM64 (windows-11-arm) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
101 lines
2.5 KiB
YAML
101 lines
2.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: 'maven'
|
|
|
|
- name: Run tests
|
|
run: mvn verify -Dspotbugs.skip=true -Dpmd.skip=true
|
|
|
|
- name: Upload test results
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: test-results
|
|
path: target/surefire-reports/
|
|
|
|
build-jar:
|
|
needs: test
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up JDK 21
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'temurin'
|
|
cache: 'maven'
|
|
|
|
- name: Build JAR
|
|
run: mvn package -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true
|
|
|
|
- name: Upload JAR
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: barn-jar
|
|
path: target/barn-*.jar
|
|
retention-days: 7
|
|
|
|
build-native:
|
|
needs: test
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- os: ubuntu-latest
|
|
artifact: barn-linux-x64
|
|
- os: ubuntu-24.04-arm
|
|
artifact: barn-linux-arm64
|
|
- os: macos-latest
|
|
artifact: barn-macos-arm64
|
|
- os: windows-latest
|
|
artifact: barn-windows-x64
|
|
- os: windows-11-arm
|
|
artifact: barn-windows-arm64
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up GraalVM
|
|
uses: graalvm/setup-graalvm@v1
|
|
with:
|
|
java-version: '21'
|
|
distribution: 'graalvm-community'
|
|
cache: 'maven'
|
|
|
|
- name: Build native image (Unix)
|
|
if: runner.os != 'Windows'
|
|
run: |
|
|
mvn package -Pnative -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
|
|
mv target/barn target/${{ matrix.artifact }}
|
|
|
|
- name: Build native image (Windows)
|
|
if: runner.os == 'Windows'
|
|
shell: cmd
|
|
run: |
|
|
mvn package -Pnative -DskipTests -Dspotbugs.skip=true -Dpmd.skip=true -Dcheckstyle.skip=true
|
|
move target\barn.exe target\${{ matrix.artifact }}.exe
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.artifact }}
|
|
path: target/${{ matrix.artifact }}*
|
|
retention-days: 7
|