mirror of
https://github.com/cmclark00/retro-imager.git
synced 2025-05-20 17:05:20 +01:00
82 lines
2.1 KiB
YAML
82 lines
2.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build-linux:
|
|
name: Build on Linux
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [x64, arm64]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v2
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v2
|
|
- name: Install Dependencies
|
|
run: sudo apt-get install -y cmake make gcc g++ libssl-dev
|
|
- name: Build
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc
|
|
make
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: linux-${{ matrix.arch }}-binaries
|
|
path: build/*
|
|
|
|
build-macos:
|
|
name: Build on macOS
|
|
runs-on: macos-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [x64, arm64]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Dependencies
|
|
run: brew install cmake
|
|
- name: Build
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=$(if [ "${{ matrix.arch }}" == "x64" ]; then echo "x86_64"; else echo "arm64"; fi)
|
|
make
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: macos-${{ matrix.arch }}-binaries
|
|
path: build/*
|
|
|
|
build-windows:
|
|
name: Build on Windows
|
|
runs-on: windows-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [x64, arm64]
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- name: Install Dependencies
|
|
run: |
|
|
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
|
|
choco install mingw
|
|
- name: Build
|
|
run: |
|
|
mkdir build
|
|
cd build
|
|
cmake .. -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release
|
|
mingw32-make
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: windows-${{ matrix.arch }}-binaries
|
|
path: build/*
|