Skip to content

Commit

Permalink
Join build workflows (#288)
Browse files Browse the repository at this point in the history
* Join build workflows
Fixes #287

* Fix artefact condition and add env versions

* Remove action file
  • Loading branch information
SavenkovIgor authored Jun 17, 2023
1 parent 8c77452 commit f8210e4
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 138 deletions.
76 changes: 68 additions & 8 deletions .github/workflows/AppBuild.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Application build
name: Frontend build, and deploy to GitHub Pages

on:
push:
Expand All @@ -10,6 +10,9 @@ env:
EMSDK_VERSION: 3.1.25
QT_VERSION: 6.5.0
QT_ROOT: ${{ github.workspace }}/Qt
CONAN_VERSION: 2.0.6
AQT_VERSION: ==3.1.5
PY7ZR_VERSION: ==0.20.2

jobs:
build:
Expand All @@ -26,12 +29,45 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Install cmake, ninja, conan, qt.
uses: ./.github/workflows/build_prepare
- name: Install latest cmake and ninja
uses: lukka/get-cmake@latest

- name: Install Conan package manager
uses: turtlebrowser/get-conan@main
with:
version: ${{ env.CONAN_VERSION }}

- name: Install Qt gcc_64
uses: jurplel/install-qt-action@v3
with:
aqtversion: ${{ env.AQT_VERSION }}
py7zrversion: ${{ env.PY7ZR_VERSION }}
version: ${{ env.QT_VERSION }}
dir: ${{ github.workspace }}
arch: 'gcc_64'
modules: 'qtimageformats qt5compat qtshadertools'
archives: 'qttranslations qttools qtsvg qtdeclarative qtbase icu'
cache: true

- name: Install Emsdk
if: matrix.build_profile == 'wasm_release'
uses: mymindstorm/setup-emsdk@v12
with:
version: ${{ env.EMSDK_VERSION }}
no-cache: true

- name: Install Qt wasm multithread
if: matrix.build_profile == 'wasm_release'
uses: jurplel/install-qt-action@v3
with:
qt-version: ${{ env.QT_VERSION }}
install-wasm-deps: ${{ matrix.build_profile == 'wasm_release' }}
emsdk-version: ${{ env.EMSDK_VERSION }}
aqtversion: ${{ env.AQT_VERSION }}
py7zrversion: ${{ env.PY7ZR_VERSION }}
version: ${{ env.QT_VERSION }}
dir: ${{ github.workspace }}
arch: 'wasm_singlethread'
modules: 'qtimageformats qt5compat qtshadertools'
archives: 'qttranslations qttools qtsvg qtdeclarative qtbase icu'
cache: true

- name: Create default Conan profile
run: conan profile detect
Expand All @@ -45,6 +81,30 @@ jobs:
- name: Cmake build
run: ./project.py --build --preset ${{ matrix.build_profile }}

- if: ${{ matrix.build_profile != 'wasm_release' }}
name: CTest
- name: CTest
if: matrix.build_profile != 'wasm_release'
run: ./project.py --test --preset ${{ matrix.build_profile }}

- name: Upload artifact
if: matrix.build_profile == 'wasm_release' && github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: actions/upload-pages-artifact@v1
with:
path: ${{github.workspace}}/build/wasm_release/deploy

deploy:
needs: build
if: github.ref == 'refs/heads/main' && github.event_name == 'push'

permissions:
id-token: write
pages: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
66 changes: 0 additions & 66 deletions .github/workflows/FrontendBuildDeploy.yml

This file was deleted.

64 changes: 0 additions & 64 deletions .github/workflows/build_prepare/action.yml

This file was deleted.

0 comments on commit f8210e4

Please sign in to comment.