v1.8.0 #228
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
name: Build | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
# - dev | |
pull_request: | |
env: | |
QT_RELEASE_VER: 6.7.0 | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-20.04 | |
- windows-latest | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- name: Install Qt | |
uses: jurplel/install-qt-action@v4 | |
with: | |
version: "6.7.0" | |
modules: "qtcharts" | |
cache: true | |
- name: Get number of CPU cores | |
if: runner.os != 'Windows' | |
uses: SimenB/github-actions-cpu-cores@v2 | |
id: cpu-cores | |
- name: Setup Visual Studio Tools | |
if: runner.os == 'Windows' | |
uses: egor-tensin/vs-shell@v2 | |
with: | |
arch: x64 | |
- name: Install jom | |
if: runner.os == 'Windows' | |
run: choco install jom | |
- name: Setup Linux | |
if: runner.os == 'Linux' | |
run: | | |
echo "DISTRIBUTION=AppImage" >> "$GITHUB_ENV" | |
sudo apt-get install libxkbcommon-dev libxkbcommon-x11-0 fuse libxcb-cursor-dev | |
- name: Run QMake | |
run: | | |
mkdir build | |
cd build | |
qmake ../PAL.pro "DISTRIBUTION=$DISTRIBUTION" | |
- name: Compile for Windows | |
if: runner.os == 'Windows' | |
run: | | |
cd build | |
jom | |
- name: Compile for Linux/macOS | |
if: runner.os != 'Windows' | |
run: | | |
cd build | |
make -k -j${{ steps.cpu-cores.outputs.count }} |