mirror of
https://github.com/PSI-Rockin/DobieStation.git
synced 2024-06-02 19:38:33 -04:00
ci: Add Windows CMake build, other changes
Opt out of PowerShell telemetry. Remove unneeded names from Actions. Move env before run for consistency. Capitalize CMake. Remove redundant `brew analytics off` command.
This commit is contained in:
parent
86f04c1a9c
commit
92a6b23dbd
87
.github/workflows/CI.yml
vendored
87
.github/workflows/CI.yml
vendored
|
@ -3,22 +3,22 @@ name: CI
|
|||
on:
|
||||
push:
|
||||
paths-ignore:
|
||||
- '.github/CONTRIBUTING.md'
|
||||
- '.github/FUNDING.md'
|
||||
- '.github/ISSUE_TEMPLATE.md'
|
||||
- '.appveyor.yml'
|
||||
- 'README.md'
|
||||
- .github/*
|
||||
- .github/ISSUE_TEMPLATE/**
|
||||
- .appveyor.yml
|
||||
- README.md
|
||||
pull_request:
|
||||
paths-ignore:
|
||||
- '.github/CONTRIBUTING.md'
|
||||
- '.github/FUNDING.md'
|
||||
- '.github/ISSUE_TEMPLATE.md'
|
||||
- '.appveyor.yml'
|
||||
- 'README.md'
|
||||
- .github/*
|
||||
- .github/ISSUE_TEMPLATE/**
|
||||
- .appveyor.yml
|
||||
- README.md
|
||||
|
||||
jobs:
|
||||
Windows:
|
||||
runs-on: windows-latest
|
||||
env:
|
||||
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
|
@ -27,28 +27,49 @@ jobs:
|
|||
- uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install Qt
|
||||
uses: jurplel/install-qt-action@v2
|
||||
- name: Setup MSBuild
|
||||
uses: microsoft/setup-msbuild@v1
|
||||
- uses: jurplel/install-qt-action@v2
|
||||
- uses: microsoft/setup-msbuild@v1
|
||||
- name: Build
|
||||
run: msbuild DobieStation\DobieStation.sln /m /nologo /p:Configuration="${{ matrix.Configuration }}"
|
||||
env:
|
||||
QTDIR: ${{ env.Qt5_Dir }}
|
||||
run: msbuild DobieStation\DobieStation.sln /m /nologo /p:Configuration="${{ matrix.Configuration }}"
|
||||
- name: Prepare artifacts
|
||||
if: matrix.Configuration != 'Release'
|
||||
run: |
|
||||
robocopy . build\bin LICENSE /r:0 /w:0
|
||||
If ($LastExitCode -lt 8) { $LastExitCode = 0 }
|
||||
del build\bin\*.lib
|
||||
mv LICENSE build\bin
|
||||
rm build\bin\*.lib
|
||||
- name: Upload artifacts
|
||||
if: matrix.Configuration != 'Release'
|
||||
uses: actions/upload-artifact@v1
|
||||
if: success()
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: DobieStation-${{ runner.os }}-${{ matrix.Configuration }}
|
||||
path: build\bin
|
||||
|
||||
Linux-cmake:
|
||||
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
|
||||
|
@ -62,10 +83,10 @@ jobs:
|
|||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -qq qt5-default qtmultimedia5-dev libglu1-mesa-dev
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
- name: Build
|
||||
working-directory: build
|
||||
run: |
|
||||
cmake .. -DCMAKE_BUILD_TYPE=${{ matrix.Configuration }}
|
||||
make -j$(nproc)
|
||||
|
||||
|
@ -87,14 +108,14 @@ jobs:
|
|||
- name: Prepare artifacts
|
||||
run: |
|
||||
mkdir artifacts
|
||||
cp LICENSE DobieStation/DobieStation artifacts
|
||||
mv LICENSE DobieStation/DobieStation artifacts
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: DobieStation-${{ runner.os }}
|
||||
path: artifacts
|
||||
|
||||
macOS-cmake:
|
||||
macOS-CMake:
|
||||
runs-on: macos-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
@ -108,13 +129,12 @@ jobs:
|
|||
env:
|
||||
HOMEBREW_NO_ANALYTICS: 1
|
||||
run: |
|
||||
brew analytics off
|
||||
brew install qt
|
||||
brew link qt --force
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir build
|
||||
cd 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)
|
||||
|
||||
|
@ -128,7 +148,6 @@ jobs:
|
|||
env:
|
||||
HOMEBREW_NO_ANALYTICS: 1
|
||||
run: |
|
||||
brew analytics off
|
||||
brew install qt
|
||||
brew link qt --force
|
||||
- name: Build
|
||||
|
@ -139,9 +158,9 @@ jobs:
|
|||
- name: Prepare artifacts
|
||||
run: |
|
||||
mkdir artifacts
|
||||
cp LICENSE DobieStation/DobieStation artifacts
|
||||
mv LICENSE DobieStation/DobieStation artifacts
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v1
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: DobieStation-${{ runner.os }}
|
||||
path: artifacts
|
||||
|
|
Loading…
Reference in a new issue