Skip to content

Merge pull request #71 from thewtex/castxml-bump #34

Merge pull request #71 from thewtex/castxml-bump

Merge pull request #71 from thewtex/castxml-bump #34

Workflow file for this run

name: Multi-Arch CI
on:
push:
branches: ["master"]
pull_request:
branches: ["master"]
jobs:
build:
name: Build (OS=${{ matrix.os }}, Arch=${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-24.04, ubuntu-22.04]
arch: [ x86_64 ]
include:
- os: ubuntu-24.04-arm
arch: aarch64
- os: ubuntu-22.04-arm
arch: aarch64
- os: macos-13
arch: x86_64
- os: macos-15
arch: arm64
- os: windows-2025
arch: amd64
steps:
- name: Checkout code
uses: actions/checkout@v4
#####################################
# Dependencies Installation (Optional)
#####################################
# Linux dependencies
- name: Install dependencies (Linux)
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update
sudo apt-get install -y build-essential ninja-build cmake git
# If you need system LLVM for something else:
# sudo apt-get install -y clang lld llvm-dev libclang-dev
# macOS dependencies
- name: Install dependencies (macOS)
if: startsWith(matrix.os, 'macos')
run: |
brew update
brew install ninja cmake git
# Windows dependencies
- name: Install dependencies (Windows)
if: startsWith(matrix.os, 'windows')
shell: pwsh
run: |
choco install ninja cmake git -y
- name: Setup MSBuild (Windows)
if: startsWith(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v2
#####################################
# Configure the Superbuild
#####################################
- name: Configure
run: |
cmake -B build -S . -GNinja
shell: bash
#####################################
# Build the Superbuild
#####################################
- name: Build
run: ninja -C build
shell: bash
#####################################
# [Optional] Run Tests
#####################################
- name: Test
run: |
cd build/castxml-prefix/src/castxml-build
ctest --output-on-failure
#####################################
# Package the resulting castxml binary
#####################################
- name: Create Artifact (Windows)
if: startsWith(matrix.os, 'windows')
shell: cmd
run: |
cd build
7z a castxml-${{ matrix.os }}-${{ matrix.arch }}.zip castxml
move castxml-${{ matrix.os }}-${{ matrix.arch }}.zip ..
- name: Create Artifact (Non-Windows)
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
shell: bash
run: |
cd build
tar cvf castxml-${{ matrix.os }}-${{ matrix.arch }}.tar castxml
gzip -9 castxml-${{ matrix.os }}-${{ matrix.arch }}.tar
mv castxml-${{ matrix.os }}-${{ matrix.arch }}.tar.gz ..
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: castxml-${{ matrix.os }}-${{ matrix.arch }}
path: ./castxml-${{ matrix.os }}-${{ matrix.arch }}.*