mirror of
https://github.com/Lorenzooone/cc3dsfs.git
synced 2026-03-21 17:55:00 -05:00
87 lines
2.3 KiB
YAML
87 lines
2.3 KiB
YAML
name: CD
|
|
|
|
on:
|
|
# Trigger the workflow on push,
|
|
# but only for the master branch
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.platform.name }} ${{ matrix.config.name }}
|
|
runs-on: ${{ matrix.platform.os }}
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- { name: Windows VS2022, os: windows-2022 }
|
|
- { name: Windows VS2022 ARM, os: windows-2022, flags: -A ARM64}
|
|
- { name: Linux GCC, os: ubuntu-latest }
|
|
- { name: macOS Apple Silicon, os: macos-14 }
|
|
config:
|
|
- { name: Static, flags: -DBUILD_SHARED_LIBS=FALSE }
|
|
|
|
steps:
|
|
- name: Install Linux Dependencies
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get update && sudo apt-get install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Configure
|
|
shell: bash
|
|
run: cmake -S . -B build -DCMAKE_INSTALL_PREFIX=install ${{matrix.platform.flags}} ${{matrix.config.flags}}
|
|
|
|
- name: Build Windows
|
|
if: runner.os == 'Windows'
|
|
shell: bash
|
|
run: cmake --build build --config Release
|
|
|
|
- name: Build (not Windows)
|
|
if: runner.os != 'Windows'
|
|
shell: bash
|
|
run: cmake --build build --config Release -j
|
|
|
|
- name: Pack
|
|
shell: bash
|
|
run: cd build && cpack -G ZIP
|
|
|
|
- name: Unpack Codesign Repack
|
|
if: runner.os == 'macOS'
|
|
shell: bash
|
|
run: setup_scripts/macos_bundle_signature.sh cc3dsfs_macos
|
|
|
|
- name: Archive resulting artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: cc3dsfs_zip
|
|
path: build/cc3dsfs*.zip
|
|
|
|
publish:
|
|
name: Publishing
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download a single artifact
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: cc3dsfs_zip
|
|
- name: Auto-Release the zips
|
|
uses: IsaacShelton/update-existing-release@v1.3.2
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
release: "Automatic Build"
|
|
prerelease: true
|
|
tag: "nightly-latest"
|
|
replace: true
|
|
files: >
|
|
cc3dsfs_windows_arm64.zip
|
|
cc3dsfs_windows_x86_64.zip
|
|
cc3dsfs_linux_x86_64.zip
|
|
cc3dsfs_macos.zip
|