Skip to content

wip: gha test

wip: gha test #79

Workflow file for this run

name: Baboon Build
on:
push:
branches: [ "main" ]
tags:
- "v*.*.*"
pull_request:
branches: [ "main" ]
permissions:
contents: write
actions: write
jobs:
build-unix:
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: [ ]
- target: linux-aarch64
os: self-hosted
runs-on: [ "ARM64" ]
preconfigured: true
nix-cache-disabled: true
- target: macos-amd64-13
os: macos-13 # this is amd64
runs-on: [ ]
- target: macos-aarch64-14
runs-on: [ ]
os: macos-14 # yes, this is aarch64
name: ${{ matrix.target }}
runs-on:
- ${{ matrix.os }}
- ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
# - name: Install Nix (Linux)
# if: matrix.preconfigured != true
# uses: nixbuild/nix-quick-install-action@v28
- name: Install Nix
if: matrix.preconfigured != true
uses: DeterminateSystems/nix-installer-action@main
# - name: Restore and cache Nix store
# uses: nix-community/cache-nix-action@v5
# if: matrix.preconfigured != true
# with:
# primary-key: nix-${{ matrix.target }}-${{ hashFiles('**/*.nix') }}
# restore-prefixes-first-match: nix-${{ matrix.target }}-
# gc-max-store-size-linux: 1073741824
# purge: true
# purge-prefixes: cache-${{ matrix.target }}-
# purge-created: 0
# purge-primary-key: never
- name: Build
run: |
./nix-rebuild.sh
- uses: actions/upload-artifact@v4
with:
name: baboon-${{ matrix.target }}
path: |
target/graalvm-native-image/**
# # nix-quick-install is broken on aarch64 mac agents: https://github.com/nixbuild/nix-quick-install-action/issues/43
# build-mac-arm:
# strategy:
# fail-fast: false
# matrix:
# include:
# - target: macos-aarch64-14
# runs-on: [ ]
# os: macos-14 # yes, this is aarch64
# name: ${{ matrix.target }}
# runs-on:
# - ${{ matrix.os }}
# - ${{ matrix.runs-on }}
# steps:
# - uses: actions/checkout@v4
## - uses: nixbuild/nix-quick-install-action@v28
## - run: nix build --version
# - name: Install Nix (Mac)
# if: matrix.preconfigured != true
# uses: cachix/install-nix-action@v27
# with:
# nix_path: nixpkgs=channel:nixos-unstable
# - name: Build (Mac)
# run: |
# ./nix-rebuild.sh
# - uses: actions/upload-artifact@v4
# with:
# name: baboon-${{ matrix.target }}
# path: |
# target/graalvm-native-image/**
build-windows:
strategy:
fail-fast: false
matrix:
include:
- target: windows-amd64
os: windows-2022
runs-on: [ ]
java-version: '23'
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
with:
java-version: '${{ matrix.java-version }}'
distribution: 'graalvm-community'
github-token: ${{ secrets.GITHUB_TOKEN }}
cache: 'sbt'
native-image-job-reports: true
- name: Build (windows)
shell: bash
run: bash ./local-rebuild.sh
- uses: actions/upload-artifact@v4
with:
name: baboon-${{ matrix.target }}
path: |
target/graalvm-native-image/**
prepare-release:
runs-on:
- ubuntu-latest
needs:
- build-unix
# - build-mac-arm
- build-windows
steps:
- uses: actions/checkout@v4
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: binaries
pattern: baboon-*
- name: Prepare layout
run: |
bash prepare-dist.sh ./binaries
- uses: softprops/action-gh-release@v2
id: create-release
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
dist-bin/**
dist-zip/**