qt, refactor: fix deprecation warnings, remove debug info during build #34
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
on: | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
- reopened | |
branches: | |
- static-experimental | |
- static | |
workflow_dispatch: | |
jobs: | |
build-project-job: | |
# Execute on pull requests within the same repository (and not forks) or on manual dispatch | |
if: ${{ github.actor == 'DeckerSU' && (github.event_name == 'workflow_dispatch' || (github.event.pull_request.head.repo.full_name == github.repository)) }} | |
runs-on: [self-hosted, Linux, X64] | |
name: Build project job | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set variables | |
run: | | |
echo "branch=$(echo ${{ github.ref }} | sed 's/refs\/heads\///g')" >> $GITHUB_OUTPUT | |
echo "sha_short=$(git rev-parse --short ${{ github.sha }})" >> $GITHUB_OUTPUT | |
echo "builder_name=$(echo $USER)" >> $GITHUB_OUTPUT | |
echo "builder_uid=$(id -u)" >> $GITHUB_OUTPUT | |
echo "builder_gid=$(id -g)" >> $GITHUB_OUTPUT | |
echo "is_fork=${{ github.event.pull_request.head.repo.fork }}" >> $GITHUB_OUTPUT | |
id: set_variables_step | |
- name: Print variables | |
run: | | |
echo "Event Type: ${{ github.event_name }}" | |
echo "Repository name: ${{ github.event.repository.name }}" | |
echo "Branch: ${{ steps.set_variables_step.outputs.branch }}" | |
echo "Commit: ${{ steps.set_variables_step.outputs.sha_short }}" | |
echo "builder_name: ${{ steps.set_variables_step.outputs.builder_name }}" | |
echo "builder_uid: ${{ steps.set_variables_step.outputs.builder_uid }}" | |
echo "builder_gid: ${{ steps.set_variables_step.outputs.builder_gid }}" | |
echo "is_fork: ${{ steps.set_variables_step.outputs.is_fork }}" | |
- name: Build app in docker container | |
uses: ./.github/actions/build-project-docker | |
id: build-in-docker | |
with: | |
builder-name: '${{ steps.set_variables_step.outputs.builder_name }}' | |
builder-uid: '${{ steps.set_variables_step.outputs.builder_uid }}' | |
builder-gid: '${{ steps.set_variables_step.outputs.builder_gid }}' | |
# we don't want use strategy / matrix here, bcz in this case matrix will be used | |
# for entire job and docker containet will be rebuild several times | |
- name: Archive artifacts (Linux) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: komodoocean-linux-${{ steps.set_variables_step.outputs.sha_short }} | |
path: | | |
./releases/focal | |
- name: Archive artifacts (Windows) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: komodoocean-windows-${{ steps.set_variables_step.outputs.sha_short }} | |
path: | | |
./releases/windows | |
- name: Archive artifacts (MacOS) | |
uses: actions/upload-artifact@v3 | |
with: | |
name: komodoocean-macos-${{ steps.set_variables_step.outputs.sha_short }} | |
path: | | |
./releases/macos | |
- name: Cleanup workspace after build | |
if: always() | |
shell: bash | |
run: | | |
rm -rf ${{ github.workspace }}/* | |