V0.9.0 #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
# see https://github.com/actions/runner-images/tree/main/images/ for available and default compilers etc. | |
jobs: | |
build_ubuntu: | |
name: "Build on Ubuntu" | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
matrix: | |
config: | |
- { | |
name: "Ubuntu Low (AppImage)", | |
os: "ubuntu-22.04", | |
cc: "gcc-10", | |
cxx: "g++-10" | |
} | |
- { | |
name: "Ubuntu High", | |
os: "ubuntu-24.04", | |
cc: "clang-18", | |
cxx: "clang++-18" | |
} | |
fail-fast: false | |
env: | |
CC: ${{ matrix.config.cc }} | |
CXX: ${{ matrix.config.cxx }} | |
app_dir: /tmp/tmp.JbLDI6xwc5 | |
bld_dir: build_dir | |
steps: | |
- name: "Clone w/ submodules" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: "recursive" | |
- name: Update apt | |
run: sudo apt update | |
- name: Install missing packages | |
run: sudo apt install libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libglu1-mesa-dev freeglut3-dev mesa-common-dev libwayland-bin | |
- name: Check config | |
run: | | |
$CC --version | |
$CXX --version | |
- name: Configure | |
run: cmake -S . -B $bld_dir -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC --install-prefix $app_dir/usr -DARB_ARCH=x86-64-v2 | |
- name: Build | |
run: cmake --build $bld_dir -j 2 | |
- name: Install | |
run: cmake --install $bld_dir | |
if: ${{ startsWith(matrix.config.cc, 'gcc') }} | |
- name: Get Linuxdeploy | |
if: ${{ startsWith(matrix.config.cc, 'gcc') }} | |
run: wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage | |
- name: Mark executable | |
if: ${{ startsWith(matrix.config.cc, 'gcc') }} | |
run: chmod +x ./linuxdeploy-x86_64.AppImage | |
- name: Package Arbor GUI AppImage | |
if: ${{ startsWith(matrix.config.cc, 'gcc') }} | |
run: ./linuxdeploy-x86_64.AppImage --appdir="$app_dir" --output=appimage | |
- name: Delete Linuxdeploy | |
if: ${{ startsWith(matrix.config.cc, 'gcc') }} | |
run: rm -f ./linuxdeploy-x86_64.AppImage | |
- uses: actions/upload-artifact@v3 | |
if: ${{ startsWith(matrix.config.cc, 'gcc') }} | |
with: | |
name: linux appimage | |
path: './*.AppImage*' | |
build_macos: | |
name: "Build on MacOS" | |
runs-on: ${{ matrix.config.os }} | |
strategy: | |
matrix: | |
config: | |
- { | |
name: "MacOS 11 (DiskIm)", | |
os: "macos-11", | |
cc: "clang", | |
cxx: "clang++" | |
} | |
- { | |
name: "MacOS 12", | |
os: "macos-12", | |
cc: "clang", | |
cxx: "clang++" | |
} | |
- { | |
name: "MacOS 13", | |
os: "macos-13", | |
cc: "clang", | |
cxx: "clang++" | |
} | |
env: | |
CC: ${{ matrix.config.cc }} | |
CXX: ${{ matrix.config.cxx }} | |
steps: | |
- name: "Clone w/ submodules" | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: "recursive" | |
- name: Check config | |
run: | | |
$CC --version | |
$CXX --version | |
- name: Configure | |
run: cmake -S . -B build -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARBORGUI_BUILD_BUNDLE=ON | |
- name: Build | |
run: cmake --build build -j 2 --target package | |
- name: Upload .dmg | |
if: ${{ matrix.config.os == 'macos-11' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: apple dmg | |
path: build/*.dmg |