Skip to content

Development

Development #9

name: Stable Build Matrix
on:
pull_request:
branches:
- stable
workflow_dispatch:
permissions:
contents: write
jobs:
build-desktop:
name: ${{ matrix.artifact_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
os_name: linux
feature: gui
artifact_name: arcadia-desktop-linux
- os: ubuntu-latest
os_name: linux
feature: headless
artifact_name: arcadia-desktop-linux-headless
- os: macos-latest
os_name: macos
feature: gui
artifact_name: arcadia-desktop-macos
- os: macos-latest
os_name: macos
feature: headless
artifact_name: arcadia-desktop-macos-headless
- os: windows-latest
os_name: windows
feature: gui
artifact_name: arcadia-desktop-windows
- os: windows-latest
os_name: windows
feature: headless
artifact_name: arcadia-desktop-windows-headless
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache Rust dependencies
uses: swatinem/rust-cache@v2
with:
workspaces: |
Desktop -> target
Shared/ArcadiaCore -> target
- 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 --manifest-path Desktop/Cargo.toml --target-dir target --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/${{ matrix.artifact_name }}.exe"
Copy-Item "target/debug/arcadia.exe" $target
- name: Package binary (macOS/Linux)
if: runner.os != 'Windows'
shell: bash
run: |
mkdir -p dist
cp target/debug/arcadia "dist/${{ matrix.artifact_name }}"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: dist/*
if-no-files-found: error
build-mobile-ios:
name: arcadia-mobile-ios
runs-on: macos-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build iOS app (simulator)
shell: bash
run: |
xcodebuild \
-project Mobile/iOS/ArcadiaApp.xcodeproj \
-scheme ArcadiaApp \
-configuration Release \
-sdk iphonesimulator \
-destination "generic/platform=iOS Simulator" \
CODE_SIGNING_ALLOWED=NO \
-derivedDataPath build/ios \
build
- name: Package iOS app
shell: bash
run: |
mkdir -p dist
cp -R "build/ios/Build/Products/Release-iphonesimulator/ArcadiaApp.app" "dist/arcadia-mobile-ios.app"
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: arcadia-mobile-ios
path: dist/*
if-no-files-found: error
release:
name: Create Stable Release
needs: [build-desktop, build-mobile-ios]
runs-on: ubuntu-latest
steps:
- name: Download matrix artifacts
uses: actions/download-artifact@v4
with:
pattern: arcadia-*
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/*