Skip to content

LPub3D continuous release_build skip_qemu #56

LPub3D continuous release_build skip_qemu

LPub3D continuous release_build skip_qemu #56

Workflow file for this run

# Build, check and deploy LPub3D
# Trevor SANDY <trevor.sandy@gmail.com>
# Last Update: March 11, 2023
# Copyright (C) 2021 - 2023 by Trevor SANDY
#
# Commit message strings with [skip ci], [ci skip], [no ci], [skip actions], or [actions skip]
# will skip pull request and push workflows.
#
name: builds # used for badge label
on:
push:
branches:
- 'master'
tags:
- 'v*'
- '!continuous'
workflow_dispatch:
jobs:
build-linux:
# if: ${{ false }} # uncomment to disable
name: Build Linux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix: # ubuntu-amd64, ubuntu-arm64, ubuntu-amd64-appimage, ubuntu-arm64-appimage, fedora-amd64, archlinux-amd64
BUILD: [ ubuntu-amd64, ubuntu-arm64, ubuntu-amd64-appimage, ubuntu-arm64-appimage, fedora-amd64, archlinux-amd64 ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Work Paths
run: |
echo "LP3D_3RD_PARTY_PATH=$(cd ../ && echo "$PWD/third_party")" >> ${GITHUB_ENV}
echo "LP3D_BUILDPKG_PATH=$(cd ../ && echo "$PWD/buildpkg")" >> ${GITHUB_ENV}
- name: Cache Third-party
id: cache-third-party
uses: actions/cache@v3
with:
path: ${{ env.LP3D_3RD_PARTY_PATH }}
key: third-party-${{ matrix.BUILD }}-${{ secrets.THIRD_PARTY_CACHE }}
- name: Build ${{ matrix.BUILD }}
run: bash -ex builds/utilities/ci/github/linux-build.sh
env:
BUILD: ${{ matrix.BUILD }}
LP3D_COMMIT_MSG: ${{ github.event.head_commit.message }}
DOCKER_HUB_TOKEN: ${{ secrets.DOCKER_HUB_TOKEN }}
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
- name: List Artifacts
if: always()
run: test -d ${{ env.LP3D_BUILDPKG_PATH }} && ls -alFR ${{ env.LP3D_BUILDPKG_PATH }} || true
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.BUILD }}-download
path: ${{ env.LP3D_BUILDPKG_PATH }}/
if-no-files-found: ignore
- name: Diagnostics
if: failure() || cancelled()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.BUILD }}-logs
path: ${{ env.LP3D_BUILDPKG_PATH }}/
if-no-files-found: ignore
build-macos:
# if: ${{ false }} # uncomment to disable
name: Build macOS
runs-on: macos-11
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Work Paths
run: |
echo "LP3D_3RD_PARTY_PATH=$(cd ../ && echo "$PWD/third_party")" >> ${GITHUB_ENV}
echo "LP3D_BUILDPKG_PATH=$(cd ../ && echo "$PWD/buildpkg")" >> ${GITHUB_ENV}
- name: Cache Third-party
id: cache-third-party
uses: actions/cache@v3
with:
path: ${{ env.LP3D_3RD_PARTY_PATH }}
key: third-party-macos-${{ secrets.THIRD_PARTY_CACHE }}
- name: Build macOS
run: bash -ex builds/utilities/ci/github/macos-build.sh
env:
LP3D_COMMIT_MSG: ${{ github.event.head_commit.message }}
- name: List Artifacts
if: always()
run: test -d ${{ env.LP3D_BUILDPKG_PATH }} && ls -alFR ${{ env.LP3D_BUILDPKG_PATH }} || true
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: macos-download
path: ${{ env.LP3D_BUILDPKG_PATH }}/
if-no-files-found: ignore
- name: Diagnostics
if: failure() || cancelled()
uses: actions/upload-artifact@v3
with:
name: macos-logs
path: ${{ env.LP3D_BUILDPKG_PATH }}/
if-no-files-found: ignore
build-windows:
# if: ${{ false }} # uncomment to disable
name: Build Windows
runs-on: windows-2019
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Work Paths
run: |
Echo "LP3D_3RD_PARTY_PATH=$(Join-Path (resolve-path ..\) 'third_party')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
Echo "LP3D_BUILDPKG_PATH=$(Join-Path (resolve-path ..\) 'buildpkg')" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
Echo "LP3D_BUILD_BASE=$(resolve-path ..\)" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf8 -Append
- name: Cache Third-party # distribution folder
id: cache-third-party
uses: actions/cache@v3
with:
path: ${{ env.LP3D_3RD_PARTY_PATH }}
key: third-party-windows-${{ secrets.THIRD_PARTY_CACHE }}
- name: Cache QtMSVC 2019
id: cache-qt
uses: actions/cache@v3
with:
path: ${{ env.LP3D_BUILD_BASE }}\Qt
key: qt-windows-${{ env.QT_CACHE }}
- name: Windows 8.1 SDK
run: |
Invoke-WebRequest -Method Get -Uri https://go.microsoft.com/fwlink/p/?LinkId=323507 -OutFile sdksetup.exe -UseBasicParsing
Start-Process -Wait sdksetup.exe -ArgumentList "/q", "/norestart", "/features", "OptionId.WindowsDesktopSoftwareDevelopmentKit", "OptionId.NetFxSoftwareDevelopmentKit"
shell: powershell
- name: Qt MSVC 2019 64bit # path: ..\Qt\5.15.2\msvc2019_64\bin
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
host: windows
arch: win64_msvc2019_64
dir: ${{ env.LP3D_BUILD_BASE }}
cache: true
cache-key-prefix: install-qt-action
- name: Qt MSVC 2019 32bit # path: ..\Qt\5.15.2\msvc2019\bin
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
host: windows
arch: win32_msvc2019
dir: ${{ env.LP3D_BUILD_BASE }}
cache: true
cache-key-prefix: install-qt-action
- name: Build Windows
run: .\builds\utilities\ci\github\windows-build.bat
env:
LP3D_COMMIT_MSG: ${{ github.event.head_commit.message }}
shell: cmd
- name: List Artifacts
if: always()
run: If (Test-Path -Path ${{ env.LP3D_BUILDPKG_PATH }}) { Get-ChildItem -Path ${{ env.LP3D_BUILDPKG_PATH }} –Recurse }
- name: Upload Update Artifacts
uses: actions/upload-artifact@v3
with:
name: updates
path: ${{ env.LP3D_BUILDPKG_PATH }}\Updates\
if-no-files-found: ignore
- name: Upload Download Artifacts
uses: actions/upload-artifact@v3
with:
name: windows-download
path: ${{ env.LP3D_BUILDPKG_PATH }}\Downloads\
if-no-files-found: ignore
- name: Diagnostics
if: failure() || cancelled()
uses: actions/upload-artifact@v3
with:
name: windows-logs
path: ${{ env.LP3D_BUILDPKG_PATH }}/
if-no-files-found: ignore
build-deploy:
# if: ${{ false }} # uncomment to disable
if: |
always() &&
!contains(github.event.head_commit.message, 'SKIP_DEPLOY') &&
(contains(github.event.head_commit.message, 'RELEASE_BUILD') ||
contains(github.event.head_commit.message, 'BUILD_ALL') ||
startsWith(github.event.ref, 'refs/tags/v') ||
github.event_name == 'workflow_dispatch')
name: Publish Assets
needs: [ build-linux, build-macos, build-windows ] # build-linux, build-macos, build-windows
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Assets Path
run: echo "LP3D_BUILD_ASSETS=$(cd ../ && echo "$PWD/assets")" >> ${GITHUB_ENV}
- name: Download Artifacts
uses: actions/download-artifact@v3
with: # omit 'with: name:' to download all artifacts
path: ${{ env.LP3D_BUILD_ASSETS }}
- name: List Assets
run: ls -alFR
working-directory: ${{ env.LP3D_BUILD_ASSETS }}
- name: Deploy Assets
run: bash -ex builds/utilities/ci/github/build-deploy.sh
env:
GITHUB_TOKEN: ${{ github.token }}
LP3D_COMMIT_MSG: ${{ github.event.head_commit.message }}
GPG_SIGN_KEY_ALIAS: ${{ secrets.GPG_SIGN_KEY_ALIAS }}
GPG_SIGN_PASSPHRASE: ${{ secrets.GPG_SIGN_PASSPHRASE }}
GPG_INIT_PASSPHRASE: ${{ secrets.GPG_INIT_PASSPHRASE }}
GPG_SIGN_KEY_BASE64: ${{ secrets.GPG_SIGN_KEY_BASE64 }}
SFDEPLOY_ED25519_BASE64: ${{ secrets.SFDEPLOY_ED25519_BASE64 }}
- name: Diagnostics
if: failure() || cancelled()
uses: actions/upload-artifact@v3
with:
name: publish-logs
path: ${{ env.LP3D_BUILDPKG_PATH }}/
if-no-files-found: ignore