Platform restrictions in widget definitions #64
Workflow file for this run
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 Quasar | |
on: | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- "docs/**" | |
- "**.md" | |
- "**.rst" | |
- "widgets/**" | |
- "**.js" | |
- "**.html" | |
- "**.css" | |
- "**.yml" | |
workflow_dispatch: | |
release: | |
types: | |
- created | |
jobs: | |
build: | |
strategy: | |
fail-fast: true | |
matrix: | |
builder: [windows-clang, ubuntu-gcc, ubuntu-clang] | |
include: | |
- builder: windows-clang | |
os: windows-latest | |
arch: "win64_msvc2019_64" | |
cc: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin\clang-cl.exe' | |
cxx: 'C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\Llvm\x64\bin\clang-cl.exe' | |
g: '-G "Visual Studio 17 2022" -T ClangCL,host=x64 -A x64' | |
- builder: ubuntu-gcc | |
os: ubuntu-latest | |
arch: "gcc_64" | |
cc: gcc-12 | |
cxx: g++-12 | |
g: "-G Ninja" | |
- builder: ubuntu-clang | |
os: ubuntu-latest | |
arch: "gcc_64" | |
cc: clang-16 | |
cxx: clang++-16 | |
g: "-G Ninja" | |
name: Build Quasar | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: "recursive" | |
- name: Setup Qt | |
uses: jurplel/install-qt-action@v3 | |
with: | |
aqtversion: "==3.1.*" | |
py7zrversion: ">=0.20.2" | |
version: "6.4.3" | |
arch: ${{ matrix.arch }} | |
modules: qtwebengine qtpositioning qtwebchannel qtnetworkauth qtserialport | |
- name: Set up Ninja | |
if: runner.os == 'Linux' | |
run: sudo apt-get install -y ninja-build | |
- name: Set up Clang | |
if: matrix.builder == 'ubuntu-clang' | |
uses: egor-tensin/setup-clang@v1 | |
with: | |
version: 16 | |
- name: Cache vcpkg | |
uses: lukka/run-vcpkg@v10 | |
with: | |
prependedCacheKey: ${{ matrix.builder }} | |
- name: Configure Project | |
env: | |
CC: ${{ matrix.cc }} | |
CXX: ${{ matrix.cxx }} | |
run: cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -S./ -B./build ${{ matrix.g }} | |
- name: Build Project | |
run: cmake --build ./build --config Release -- | |
- name: Package Quasar | |
if: runner.os == 'Windows' | |
shell: powershell | |
run: | | |
$QUASAR_VERSION = (Select-String -Path ./quasar/CMakeLists.txt -Pattern 'project\(quasar VERSION ([0-9\.]+)\)') | %{$_.Matches.Groups[1].value} | |
$RELEASE_PACKAGE_FILE = "quasar-windows-v$QUASAR_VERSION.zip" | |
Compress-Archive ./build/quasar/Release/* $RELEASE_PACKAGE_FILE | |
$release_filepath = Get-ChildItem $RELEASE_PACKAGE_FILE | %{$_[0].FullName} | |
echo "RELEASE_PACKAGE_PATH=$release_filepath" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Package Sample Widgets | |
if: runner.os == 'Windows' && github.event_name == 'release' | |
shell: powershell | |
run: | | |
$WIDGETS_PACKAGE_FILE = "quasar-sample-widgets.zip" | |
Compress-Archive ./widgets/ $WIDGETS_PACKAGE_FILE | |
$widgets_filepath = Get-ChildItem $WIDGETS_PACKAGE_FILE | %{$_[0].FullName} | |
echo "WIDGETS_PACKAGE_FILE=$widgets_filepath" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append | |
- name: Upload Build Artifact | |
if: runner.os == 'Windows' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: quasar-windows-Release | |
path: ${{ env.RELEASE_PACKAGE_PATH }} | |
if-no-files-found: error | |
retention-days: 1 | |
- name: Upload Release Asset | |
if: runner.os == 'Windows' && github.event_name == 'release' | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ env.RELEASE_PACKAGE_PATH }} | |
- name: Upload Sample Widgets | |
if: runner.os == 'Windows' && github.event_name == 'release' | |
uses: shogo82148/actions-upload-release-asset@v1 | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ${{ env.WIDGETS_PACKAGE_FILE }} |