Skip to content

Merge pull request #2 from stack-node/development #3

Merge pull request #2 from stack-node/development

Merge pull request #2 from stack-node/development #3

name: Stable Build Matrix
on:
push:
branches:
- stable
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: ${{ matrix.os }} / ${{ matrix.feature }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
feature: [headless, gui]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install Linux GUI build dependencies
if: runner.os == 'Linux' && matrix.feature == 'gui'
run: |
sudo apt-get update
sudo apt-get install -y \
libxcb1-dev \
libxkbcommon-dev \
libxkbcommon-x11-dev
- name: Build Arcadia
run: cargo build -p arcadia --no-default-features --features ${{ matrix.feature }}
- name: Package binary (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path dist | Out-Null
$target = "dist/arcadia-${{ matrix.feature }}-windows.exe"
Copy-Item "target/debug/arcadia.exe" $target
- name: Package binary (macOS/Linux)
if: runner.os != 'Windows'
shell: bash
run: |
mkdir -p dist
os_name="$(echo "${{ runner.os }}" | tr '[:upper:]' '[:lower:]')"
cp target/debug/arcadia "dist/arcadia-${{ matrix.feature }}-${os_name}"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}-${{ matrix.feature }}
path: dist/*
if-no-files-found: error
release:
name: Create Stable Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download matrix artifacts
uses: actions/download-artifact@v4
with:
pattern: build-*
path: release-assets
merge-multiple: true
- name: Compute build tag
id: build_tag
run: |
echo "tag=build-${{ github.run_number }}" >> "${GITHUB_OUTPUT}"
echo "name=Stable Build ${{ github.run_number }}" >> "${GITHUB_OUTPUT}"
- name: Publish GitHub release with assets
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.build_tag.outputs.tag }}
name: ${{ steps.build_tag.outputs.name }}
target_commitish: ${{ github.sha }}
generate_release_notes: true
files: |
release-assets/*