DobieStation/.github/workflows/CI.yml
Ziemas 6989149aaa Specifically get Qt5 on mac CI
Otherwise we get Qt6
2021-04-20 15:47:05 +02:00

170 lines
4.2 KiB
YAML

name: CI
on:
push:
paths-ignore:
- '.github/*'
- '.github/*_TEMPLATE/**'
- '*.md'
- '*.yml'
pull_request:
paths-ignore:
- '.github/*'
- '.github/*_TEMPLATE/**'
- '*.md'
- '*.yml'
jobs:
Windows:
runs-on: windows-latest
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
matrix:
Configuration: [Release Optimized, Release, Debug, Devel]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: jurplel/install-qt-action@v2
- uses: microsoft/setup-msbuild@v1
- name: Build
env:
QTDIR: ${{ env.Qt5_Dir }}
run: msbuild DobieStation\DobieStation.sln /m /nologo /p:Configuration="${{ matrix.Configuration }}"
- name: Prepare artifacts
if: matrix.Configuration != 'Release'
run: Move-Item LICENSE build\bin
- name: Upload artifacts
if: matrix.Configuration != 'Release'
uses: actions/upload-artifact@v2
with:
name: DobieStation-${{ runner.os }}-${{ matrix.Configuration }}
path: |
build\bin
!**\*.lib
if-no-files-found: error
Windows-CMake:
runs-on: windows-latest
env:
POWERSHELL_TELEMETRY_OPTOUT: 1
strategy:
fail-fast: false
matrix:
Configuration: [Release, RelWithDebInfo, Debug]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: jurplel/install-qt-action@v2
- name: CMake generate
run: |
mkdir build
cd build
cmake ..
- name: Build
working-directory: build
env:
QTDIR: ${{ env.Qt5_Dir }}
run: cmake --build . --config ${{ matrix.Configuration }} -j $env:NUMBER_OF_PROCESSORS
Linux-CMake:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
Configuration: [Release, RelWithDebInfo, Debug]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Qt
run: |
sudo apt-get update -qq
sudo apt-get install -qq qt5-default qtmultimedia5-dev libglu1-mesa-dev
mkdir build
- name: Build
working-directory: build
run: |
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }}
make -j$(nproc)
Linux-qmake:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Qt
run: |
sudo apt-get update -qq
sudo apt-get install -qq qt5-default qtmultimedia5-dev libglu1-mesa-dev
- name: Build
working-directory: DobieStation
run: |
qmake DobieStation.pro
make -j$(nproc)
- name: Prepare artifacts
run: |
mkdir artifacts
mv LICENSE DobieStation/DobieStation artifacts
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: DobieStation-${{ runner.os }}
path: artifacts
if-no-files-found: error
macOS-CMake:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
Configuration: [Release, RelWithDebInfo, Debug]
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Qt
env:
HOMEBREW_NO_ANALYTICS: 1
run: |
brew install qt@5
brew link qt@5 --force
mkdir build
- name: Build
working-directory: build
run: |
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }} -DCMAKE_PREFIX_PATH=/usr/local/opt/qt5
make -j$(sysctl -n hw.ncpu)
macOS-qmake:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install Qt
env:
HOMEBREW_NO_ANALYTICS: 1
run: |
brew install qt@5
brew link qt@5 --force
- name: Build
working-directory: DobieStation
run: |
qmake DobieStation.pro
make -j$(sysctl -n hw.ncpu)
- name: Prepare artifacts
run: |
mkdir artifacts
mv LICENSE DobieStation/DobieStation artifacts
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: DobieStation-${{ runner.os }}
path: artifacts
if-no-files-found: error