Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
107 additions
and
2 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
# This is a basic workflow to help you get started with Actions | ||
|
||
name: CI | ||
|
||
# Controls when the action will run. Triggers the workflow on push or pull request | ||
# events but only for the master branch | ||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
name: ${{ matrix.config.name }}-${{ matrix.type }} | ||
runs-on: ${{ matrix.config.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
config: | ||
- { | ||
name: "Windows x32", | ||
os: windows-latest, | ||
cpack_install_generator: -G WIX, | ||
generator: "-G'Visual Studio 16 2019' -A Win32", | ||
qt_arch: 'win32_msvc2017' | ||
} | ||
- { | ||
name: "Windows x64", | ||
os: windows-latest, | ||
cpack_install_generator: -G WIX, | ||
generator: "-G'Visual Studio 16 2019' -A x64", | ||
qt_arch: 'win64_msvc2017_64' | ||
} | ||
- { | ||
name: "Ubuntu", | ||
os: ubuntu-latest, | ||
cpack_install_generator: -G DEB | ||
} | ||
- { | ||
name: "MacOS", | ||
os: macos-latest, | ||
cpack_install_generator: -G DragNDrop | ||
} | ||
type: [portable, installer] | ||
|
||
steps: | ||
- name: 🐞Fixup chocolately | ||
run: Remove-Item -Path $env:ChocolateyInstall\\bin\\cpack.exe -Force | ||
shell: pwsh | ||
if: "contains(matrix.config.os, 'windows')" | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v1 | ||
with: | ||
submodules: true | ||
- name: Cache Qt | ||
id: cache-qt | ||
uses: actions/cache@v1 | ||
with: | ||
path: ../Qt | ||
key: ${{ runner.os }}-QtCache-${{matrix.config.qt_arch}} | ||
- name: Install Qt | ||
uses: jurplel/install-qt-action@v2 | ||
with: | ||
version: 5.12.8 | ||
arch: ${{matrix.config.qt_arch}} | ||
cached: ${{ steps.cache-qt.outputs.cache-hit }} | ||
|
||
- name: CMake | ||
run: | | ||
echo -DBUILD_PORTABLE=$PORTABLE | ||
cmake ${{matrix.config.generator}} -DCMAKE_BUILD_TYPE=Release . -DBUILD_PORTABLE=$PORTABLE | ||
shell: bash | ||
env: | ||
PORTABLE: ${{contains(matrix.type, 'portable')}} | ||
|
||
- name: Build | ||
run: cmake --build . --config Release | ||
|
||
- name: Package Install | ||
run: cpack ${{matrix.config.cpack_install_generator}} -B "$GITHUB_WORKSPACE/Package" | ||
if: "!contains(matrix.type, 'portable')" | ||
shell: bash | ||
|
||
- name: Package Portable | ||
run: | | ||
cpack -G ZIP -B "$GITHUB_WORKSPACE/Package" | ||
ls $GITHUB_WORKSPACE/Package | ||
if: "contains(matrix.type, 'portable')" | ||
shell: bash | ||
|
||
- name: Package Clean | ||
run: rm -r $GITHUB_WORKSPACE/Package/_CPack_Packages | ||
shell: bash | ||
|
||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: ${{ matrix.config.name }}-${{ matrix.type }} | ||
path: ./Package/ | ||
|
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