Skip to content

Build Release by wyzdwdz #216

Build Release by wyzdwdz

Build Release by wyzdwdz #216

Workflow file for this run

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: x64 }
- { arch: aarch64, profile: arm64 }
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
with:
root-reserve-mb: 4096
temp-reserve-mb: 32
swap-size-mb: 32
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
- name: checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: set up QEMU
uses: docker/setup-qemu-action@v3
- 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: |
source ~/.bashrc
cd /var/www
cp ./.github/linux/CMakeUserPresets.json .
cmake . --preset linux-x64
cmake --build . --target install --preset linux-x64-release -j
cp -f ./out/install/linux-x64/bin/assfonts assfonts-${{ github.ref_name }}-x86_64-Linux
linuxdeploy --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 ./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: |
source ~/.bashrc
cd /var/www
cp ./.github/linux/CMakeUserPresets.json .
cmake . --preset linux-arm64
cmake --build . --target install --preset linux-arm64-release -j
- 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: |
source ~/.bashrc
cd /var/www
cp -f ./out/install/linux-arm64/bin/assfonts assfonts-${{ github.ref_name }}-aarch64-Linux
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
appimagetool ./assfonts-gui_AppDir assfonts-gui-${{ github.ref_name }}-aarch64-Linux.AppImage
- name: upload Linux
uses: actions/upload-artifact@v4
with:
name: release-Linux-${{ matrix.arch }}
path: assfonts*-${{ github.ref_name }}-${{ matrix.arch }}-Linux*
if-no-files-found: error
- name: upload issue
if: failure()
uses: actions/upload-artifact@v4
with:
name: linux-${{ matrix.profile }}-issue
path: out/build/linux-${{ matrix.profile }}/vcpkg_installed/vcpkg/issue_body.md
build-windows:
runs-on: windows-2022
defaults:
run:
shell: powershell
strategy:
matrix:
include:
- { arch: x86_64, profile: x64 }
- { arch: aarch64, profile: arm64 }
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: install cmake
uses: lukka/get-cmake@latest
- name: setup msvc x86_64
uses: TheMrMilchmann/setup-msvc-dev@v3
if: ${{ matrix.arch == 'x86_64' }}
with:
arch: x64
- name: setup msvc aarch64
uses: TheMrMilchmann/setup-msvc-dev@v3
if: ${{ matrix.arch == 'aarch64' }}
with:
arch: amd64_arm64
- name: build executable binary
run: |
Copy-Item -Path ".\.github\windows\CMakeUserPresets.json" -Destination "CMakeUserPresets.json" -Force
cmake . --preset windows-${{ matrix.profile }}
cmake --build . --target install --preset windows-${{ matrix.profile }}-release -j
- name: copy and rename
run: |
Copy-Item -Path ".\out\install\windows-${{ matrix.profile }}\bin\assfonts.exe" -Destination "assfonts-${{ github.ref_name }}-${{ matrix.arch }}-Windows.exe" -Force
Copy-Item -Path ".\out\install\windows-${{ matrix.profile }}\bin\assfonts-gui.exe" -Destination "assfonts-gui-${{ github.ref_name }}-${{ matrix.arch }}-Windows.exe" -Force
- name: upload Windows
uses: actions/upload-artifact@v4
with:
name: release-Windows-${{ matrix.arch }}
path: assfonts*-${{ github.ref_name }}-${{ matrix.arch }}-Windows*
if-no-files-found: error
- name: upload issue
if: failure()
uses: actions/upload-artifact@v4
with:
name: windows-${{ matrix.profile }}-issue
path: out/build/windows-${{ matrix.profile }}/vcpkg_installed/vcpkg/issue_body.md
build-macos:
runs-on: macos-12
defaults:
run:
shell: bash
strategy:
matrix:
include:
- { arch: x86_64, profile: x64 }
- { arch: aarch64, profile: arm64 }
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: install cmake
uses: lukka/get-cmake@latest
- name: build executable binary
run: |
brew install automake autoconf-archive
cp .github/macos/CMakeUserPresets.json .
cmake . --preset macos-${{ matrix.profile }}
cmake --build . --preset macos-${{ matrix.profile }}-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@v4
with:
name: release-macOS-${{ matrix.arch }}
path: assfonts-${{ github.ref_name }}-${{ matrix.arch }}-macOS.dmg
if-no-files-found: error
- name: upload issue
if: failure()
uses: actions/upload-artifact@v4
with:
name: macos-${{ matrix.profile }}-issue
path: out/build/macos-${{ matrix.profile }}/vcpkg_installed/vcpkg/issue_body.md
# release:
# runs-on: ubuntu-22.04
# defaults:
# run:
# shell: bash
# needs: [ build-linux, build-windows, build-macos ]
# steps:
# - name: checkout
# uses: actions/checkout@v4
# - name: download Linux x86_64
# uses: actions/download-artifact@v4
# with:
# name: release-Linux-x86_64
# - name: download Linux aarch64
# uses: actions/download-artifact@v4
# with:
# name: release-Linux-aarch64
# - name: download Windows x86_64
# uses: actions/download-artifact@v4
# with:
# name: release-Windows-x86_64
# - name: download Windows aarch64
# uses: actions/download-artifact@v4
# with:
# name: release-Windows-aarch64
# - name: download macOS x86_64
# uses: actions/download-artifact@v4
# with:
# name: release-macOS-x86_64
# - name: download macOS aarch64
# uses: actions/download-artifact@v4
# 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