Archived
ci: simplify build workflow to PRs only
- Build workflow now only triggers on pull requests - Removed native image builds from build workflow - Native builds are only done in release workflow on tag push Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
d97ee5b2b6
commit
436d8ee840
1 file changed
-49
@@ -1,8 +1,6 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
@@ -51,50 +49,3 @@ jobs:
|
||||
name: barn-jar
|
||||
path: target/barn-*.jar
|
||||
retention-days: 7
|
||||
|
||||
build-native:
|
||||
needs: test
|
||||
strategy:
|
||||
fail-fast: false
|
||||
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
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up GraalVM
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
java-version: '21'
|
||||
distribution: 'graalvm'
|
||||
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: pwsh
|
||||
run: |
|
||||
mvn package -Pnative -DskipTests "-Dspotbugs.skip=true" "-Dpmd.skip=true" "-Dcheckstyle.skip=true"
|
||||
Move-Item -Path "target\barn.exe" -Destination "target\${{ matrix.artifact }}.exe" -Force
|
||||
Get-ChildItem target\*.exe
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.artifact }}
|
||||
path: target/${{ matrix.artifact }}*
|
||||
retention-days: 7
|
||||
Reference in new issue
Block a user