Build Release by wyzdwdz #177
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 Release | |
run-name: Build Release by ${{ github.actor }} | |
on: | |
release: | |
types: [ published ] | |
push: | |
branches: [ vcpkg ] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
include: | |
- { arch: x86_64, profile: x86_64 } | |
- { arch: aarch64, profile: armv8 } | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
- name: aarch64 build appimage | |
if: ${{ matrix.arch == 'aarch64' }} | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: wyzdwdz/assfonts-arm64:latest | |
options: -v ${{ github.workspace }}:/var/www --platform linux/arm64 | |
shell: bash | |
run: | | |
cd /var/www | |
~/.local/bin/linuxdeploy | |
~/.local/bin/appimagetool | |
- name: x86_64 build binary and appimage | |
if: ${{ matrix.arch == 'x86_64' }} | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: wyzdwdz/assfonts-amd64:latest | |
options: -v ${{ github.workspace }}:/var/www --platform linux/amd64 | |
shell: bash | |
run: | | |
cd /var/www | |
cp -r -f ./.github/linux/triplets ~ | |
cp ./.github/linux/CMakeUserPresets.json . | |
cmake . --preset linux-x64 | |
cmake --build . --target install --preset linux-x64-release | |
cp -f ./out/install/linux-x64/bin/assfonts assfonts-${{ github.ref_name }}-x86_64-Linux | |
~/linuxdeploy-x86_64.AppImage --appimage-extract-and-run --appdir=./assfonts-gui_AppDir -e ./out/install/linux-x64/bin/assfonts-gui -d ./src/qt/resources/assfonts-gui.desktop -i ./src/qt/resources/icon.png --icon-filename=assfonts-gui --custom-apprun=./src/qt/resources/AppRun | |
mkdir -p ./assfonts-gui_AppDir/usr/share/doc/assfonts | |
cp LICENSE NEWS NOTICE ./assfonts-gui_AppDir/usr/share/doc/assfonts | |
~/appimagetool-x86_64.AppImage --appimage-extract-and-run ./assfonts-gui_AppDir assfonts-gui-${{ github.ref_name }}-x86_64-Linux.AppImage | |
- name: aarch64 build binary | |
if: ${{ matrix.arch == 'aarch64' }} | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: wyzdwdz/assfonts-amd64:latest | |
options: -v ${{ github.workspace }}:/var/www --platform linux/amd64 | |
shell: bash | |
run: | | |
cd /var/www | |
cp -r -f ./.github/linux/triplets ~ | |
cp ./.github/linux/CMakeUserPresets.json . | |
cmake . --preset linux-arm64 | |
cmake --build . --target install --preset linux-arm64-release | |
- name: aarch64 build appimage | |
if: ${{ matrix.arch == 'aarch64' }} | |
uses: addnab/docker-run-action@v3 | |
with: | |
image: wyzdwdz/assfonts-arm64:latest | |
options: -v ${{ github.workspace }}:/var/www --platform linux/arm64 | |
shell: bash | |
run: | | |
cd /var/www | |
cp -f ./out/install/linux-arm64/bin/assfonts assfonts-${{ github.ref_name }}-aarch64-Linux | |
~/.local/bin/linuxdeploy --appdir=./assfonts-gui_AppDir -e ./out/install/linux-arm64/bin/assfonts-gui -d ./src/qt/resources/assfonts-gui.desktop -i ./src/qt/resources/icon.png --icon-filename=assfonts-gui --custom-apprun=./src/qt/resources/AppRun | |
mkdir -p ./assfonts-gui_AppDir/usr/share/doc/assfonts | |
cp LICENSE NEWS NOTICE ./assfonts-gui_AppDir/usr/share/doc/assfonts | |
~/.local/bin/appimagetool ./assfonts-gui_AppDir assfonts-gui-${{ github.ref_name }}-aarch64-Linux.AppImage | |
- name: upload Linux | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-Linux-${{ matrix.arch }} | |
path: assfonts*-${{ github.ref_name }}-${{ matrix.arch }}-Linux* | |
if-no-files-found: error | |
build-windows: | |
runs-on: windows-2022 | |
defaults: | |
run: | |
shell: powershell | |
strategy: | |
matrix: | |
include: | |
- { arch: x86_64, profile: x86_64 } | |
- { arch: aarch64, profile: armv8 } | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
# - name: restore conan cache | |
# uses: actions/cache/restore@v3 | |
# with: | |
# path: .conan2/p | |
# key: conan2-windows-${{ matrix.arch }}-${{ hashFiles('.conan2/p/cache.sqlite3') }} | |
# restore-keys: | | |
# conan2-windows-${{ matrix.arch }}- | |
- name: install cmake | |
uses: lukka/get-cmake@latest | |
- name: install Conan | |
id: conan | |
uses: turtlebrowser/get-conan@main | |
with: | |
version: 2.2 | |
- name: set CONAN_HOME | |
run: Add-Content -Path $env:GITHUB_ENV -Value "CONAN_HOME=${{ github.workspace }}\.conan2" | |
- name: aarch64 fix conan recipes | |
if: ${{ matrix.arch == 'aarch64' }} | |
run: | | |
conan export .github\recipes\libffi_fix -nr --version 3.4.4 | |
conan export .github\recipes\libiconv_fix -nr --version 1.17 | |
- name: fix qt recipe | |
run: | | |
conan export recipes/qt5_fix -nr --version 5.15.10 | |
- name: aarch64 add tools to PATH | |
if: ${{ matrix.arch == 'aarch64' }} | |
run: Add-Content -Path $env:GITHUB_PATH -Value ((Get-Location -PSProvider FileSystem).Path + "\.github\tools") | |
- name: build executable binary | |
run: | | |
conan export --version 8.0.1 -nr recipes/harfbuzz_expt | |
conan config install .github\conan2-windows | |
conan install . -b missing -pr:h ${{ matrix.profile }} -pr:b x86_64 | |
.\build\generators\conanbuild.bat | |
cmake --preset conan-default | |
cmake --build --preset conan-release -j | |
cmake --install build --prefix install | |
- name: copy and rename | |
run: | | |
Copy-Item -Path ".\install\bin\assfonts.exe" -Destination "assfonts-${{ github.ref_name }}-${{ matrix.arch }}-Windows.exe" -Force | |
Copy-Item -Path ".\install\bin\assfonts-gui.exe" -Destination "assfonts-gui-${{ github.ref_name }}-${{ matrix.arch }}-Windows.exe" -Force | |
- name: upload Windows | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-Windows-${{ matrix.arch }} | |
path: assfonts*-${{ github.ref_name }}-${{ matrix.arch }}-Windows* | |
if-no-files-found: error | |
# - name: save conan cache | |
# uses: actions/cache/save@v3 | |
# with: | |
# path: .conan2/p | |
# key: conan2-windows-${{ matrix.arch }}-${{ hashFiles('.conan2/p/cache.sqlite3') }} | |
build-macos: | |
runs-on: macos-12 | |
defaults: | |
run: | |
shell: bash | |
strategy: | |
matrix: | |
include: | |
- { arch: x86_64, profile: x86_64 } | |
- { arch: aarch64, profile: armv8 } | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
# - name: restore conan cache | |
# uses: actions/cache/restore@v3 | |
# with: | |
# path: .conan2/p | |
# key: conan2-macos-${{ matrix.arch }}-${{ hashFiles('.conan2/p/cache.sqlite3') }} | |
# restore-keys: | | |
# conan2-macos-${{ matrix.arch }}- | |
- name: install cmake | |
uses: lukka/get-cmake@latest | |
- name: install Conan | |
id: conan | |
uses: turtlebrowser/get-conan@main | |
with: | |
version: 2.2 | |
- name: set CONAN_HOME | |
run: echo "CONAN_HOME=${{ github.workspace }}/.conan2" >> "$GITHUB_ENV" | |
- name: fix qt recipe | |
run: | | |
conan export recipes/qt5_fix -nr --version 5.15.10 | |
- name: build executable binary | |
run: | | |
conan export --version 8.0.1 -nr recipes/harfbuzz_expt | |
conan config install .github/conan2-macos | |
conan install . -b missing -pr:h ${{ matrix.profile }} -pr:b x86_64 | |
source ./build/Release/generators/conanbuild.sh | |
cmake --preset conan-release | |
cmake --build --preset conan-release --target package -j | |
- name: rename | |
run: | | |
mv -f assfonts.dmg assfonts-${{ github.ref_name }}-${{ matrix.arch }}-macOS.dmg | |
- name: upload macOS | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-macOS-${{ matrix.arch }} | |
path: assfonts-${{ github.ref_name }}-${{ matrix.arch }}-macOS.dmg | |
if-no-files-found: error | |
# - name: save conan cache | |
# uses: actions/cache/save@v3 | |
# with: | |
# path: .conan2/p | |
# key: conan2-macos-${{ matrix.arch }}-${{ hashFiles('.conan2/p/cache.sqlite3') }} | |
release: | |
runs-on: ubuntu-22.04 | |
defaults: | |
run: | |
shell: bash | |
needs: [ build-linux, build-windows, build-macos ] | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: download Linux x86_64 | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-Linux-x86_64 | |
- name: download Linux aarch64 | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-Linux-aarch64 | |
- name: download Windows x86_64 | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-Windows-x86_64 | |
- name: download Windows aarch64 | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-Windows-aarch64 | |
- name: download macOS x86_64 | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-macOS-x86_64 | |
- name: download macOS aarch64 | |
uses: actions/download-artifact@v3 | |
with: | |
name: release-macOS-aarch64 | |
- name: create zips | |
run: | | |
sudo apt-get install -y zip | |
mkdir -p ./share/doc/assfonts | |
cp LICENSE LICENSE.txt | |
cp NEWS NEWS.txt | |
cp NOTICE NOTICE.txt | |
cp LICENSE NEWS NOTICE ./share/doc/assfonts/ | |
mkdir -p ./share/man/man1 | |
gzip -k ./doc/man/assfonts.1 | |
cp ./doc/man/assfonts.1.gz ./share/man/man1/ | |
mkdir bin | |
cp -f assfonts-${{ github.ref_name }}-x86_64-Linux ./bin/assfonts | |
cp -f assfonts-gui-${{ github.ref_name }}-x86_64-Linux.AppImage assfonts-gui.AppImage | |
tar -czvf assfonts-${{ github.ref_name }}-x86_64-Linux.tar.gz bin/assfonts assfonts-gui.AppImage ./share/doc/assfonts/LICENSE ./share/doc/assfonts/NEWS ./share/doc/assfonts/NOTICE ./share/man/man1/assfonts.1.gz | |
rm -rf assfonts-${{ github.ref_name }}-x86_64-Linux assfonts-gui-${{ github.ref_name }}-x86_64-Linux.AppImage | |
cp -f assfonts-${{ github.ref_name }}-aarch64-Linux ./bin/assfonts | |
cp -f assfonts-gui-${{ github.ref_name }}-aarch64-Linux.AppImage assfonts-gui.AppImage | |
tar -czvf assfonts-${{ github.ref_name }}-aarch64-Linux.tar.gz bin/assfonts assfonts-gui.AppImage ./share/doc/assfonts/LICENSE ./share/doc/assfonts/NEWS ./share/doc/assfonts/NOTICE ./share/man/man1/assfonts.1.gz | |
rm -rf assfonts-${{ github.ref_name }}-aarch64-Linux assfonts-gui-${{ github.ref_name }}-aarch64-Linux.AppImage | |
cp -f assfonts-${{ github.ref_name }}-x86_64-Windows.exe assfonts.exe | |
cp -f assfonts-gui-${{ github.ref_name }}-x86_64-Windows.exe assfonts-gui.exe | |
zip assfonts-${{ github.ref_name }}-x86_64-Windows.zip assfonts.exe assfonts-gui.exe LICENSE.txt NEWS.txt NOTICE.txt README.md | |
rm -rf assfonts-${{ github.ref_name }}-x86_64-Windows.exe assfonts-gui-${{ github.ref_name }}-x86_64-Windows.exe | |
cp -f assfonts-${{ github.ref_name }}-aarch64-Windows.exe assfonts.exe | |
cp -f assfonts-gui-${{ github.ref_name }}-aarch64-Windows.exe assfonts-gui.exe | |
zip assfonts-${{ github.ref_name }}-aarch64-Windows.zip assfonts.exe assfonts-gui.exe LICENSE.txt NEWS.txt NOTICE.txt README.md | |
rm -rf assfonts-${{ github.ref_name }}-aarch64-Windows.exe assfonts-gui-${{ github.ref_name }}-aarch64-Windows.exe | |
- name: calculate hash | |
run: | | |
sha256sum assfonts-${{ github.ref_name }}-x86_64-Linux.tar.gz > assfonts-${{ github.ref_name }}-x86_64-Linux.tar.gz.sha256sum | |
sha256sum assfonts-${{ github.ref_name }}-aarch64-Linux.tar.gz > assfonts-${{ github.ref_name }}-aarch64-Linux.tar.gz.sha256sum | |
sha256sum assfonts-${{ github.ref_name }}-x86_64-Windows.zip > assfonts-${{ github.ref_name }}-x86_64-Windows.zip.sha256sum | |
sha256sum assfonts-${{ github.ref_name }}-aarch64-Windows.zip > assfonts-${{ github.ref_name }}-aarch64-Windows.zip.sha256sum | |
sha256sum assfonts-${{ github.ref_name }}-x86_64-macOS.dmg > assfonts-${{ github.ref_name }}-x86_64-macOS.dmg.sha256sum | |
sha256sum assfonts-${{ github.ref_name }}-aarch64-macOS.dmg > assfonts-${{ github.ref_name }}-aarch64-macOS.dmg.sha256sum | |
- name: edit release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: assfonts-${{ github.ref_name }}-* | |
tag: ${{ github.ref }} | |
overwrite: false | |
file_glob: true |