Skip to content

test: gha

test: gha #8

Workflow file for this run

name: Baboon Build (test)
on:
push:
branches: [ "main" ]
tags:
- "v*.*.*"
pull_request:
branches: [ "main" ]
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
# 1) don't forget about os entry in prepare-release
# 2) see : https://github.com/actions/runner-images
include:
- target: linux-amd64
os: ubuntu-latest
runs-on: [ ]
native-build-args: --verbose -J-Xmx10g
java-version: '23'
- target: macos-aarch64-14
runs-on: [ ]
os: macos-14 # yes, this is aarch64
native-build-args: --verbose -J-Xmx13g
java-version: '23'
# - target: macos-amd64-13
# os: macos-13 # this is amd64
# runs-on: [ ]
# native-build-args: --verbose -J-Xmx13g
# java-version: '23'
# - target: windows-amd64
# os: windows-2022
# runs-on: [ ]
# native-build-args: --verbose -J-Xmx10g
# java-version: '23'
# - target: linux-aarch64
# os: self-hosted
# runs-on: [ "ARM64" ]
# preconfigured: true
# native-build-args: --verbose -J-Xmx10g
name: ${{ matrix.target }}
runs-on:
- ${{ matrix.os }}
- ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
- name: Set up GraalVM (Java ${{ matrix.java-version }})
uses: graalvm/setup-graalvm@v1
if: matrix.preconfigured != true
with:
java-version: '${{ matrix.java-version }}'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'sbt'
native-image-job-reports: true
- if: startsWith( matrix.os, 'macos' )
run: |
brew install sbt
- name: Run tests
run: sbt test
- name: Build NI
run: sbt GraalVMNativeImage/packageBin
- uses: actions/upload-artifact@v4
with:
name: native-image-${{ matrix.os }}
path: |
target/graalvm-native-image/**
# - name: Run test build
# shell: bash
# run: bash test.sh
prepare-release:
runs-on: ubuntu-latest
needs: [ build ]
steps:
- uses: actions/checkout@v4
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: binaries
pattern: native-image-*
merge-multiple: true
# - uses: actions/download-artifact@v4
# with:
# name: native-image-ubuntu-latest
# path: tmp/baboon-linux-x64
# - uses: actions/download-artifact@v4
# with:
# name: native-image-macos-12
# path: tmp/baboon-mac-x64
# - uses: actions/download-artifact@v4
# with:
# name: native-image-macos-14
# path: tmp/baboon-mac-arm64
# - uses: actions/download-artifact@v4
# with:
# name: native-image-windows-2022
# path: tmp/baboon-windows-x64
- name: Prepare layout
run: |
set -x
set -e
pushd .
ls -la
cd binaries/
ls -la
tree
# zip -r9 baboon-linux-x64.zip ./baboon-linux-x64/
# zip -r9 baboon-mac-x64.zip ./baboon-mac-x64/
# zip -r9 baboon-mac-arm64.zip ./baboon-mac-arm64/
# zip -r9 baboon-windows-x64.zip ./baboon-windows-x64/
# popd
#
# mkdir dist
# mv ./tmp/baboon-linux-x64/baboon dist/baboon-linux-x64
# mv ./tmp/baboon-mac-x64/baboon dist/baboon-mac-x64
# mv ./tmp/baboon-mac-arm64/baboon dist/baboon-mac-arm64
# mv ./tmp/baboon-windows-x64/baboon.exe dist/baboon-x64.exe
#
# mkdir dist-zip
# mv ./tmp/baboon-linux-x64.zip ./dist-zip/
# mv ./tmp/baboon-mac-x64.zip ./dist-zip/
# mv ./tmp/baboon-mac-arm64.zip ./dist-zip/
# mv ./tmp/baboon-windows-x64.zip ./dist-zip/
# - uses: softprops/action-gh-release@v2
# id: create-release
# if: startsWith(github.ref, 'refs/tags/')
# with:
# files: |
# dist/**
# dist-zip/**