Skip to content

Commit

Permalink
add x86
Browse files Browse the repository at this point in the history
  • Loading branch information
wyzdwdz authored May 5, 2024
1 parent 393376f commit f8e5faa
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 79 deletions.
2 changes: 2 additions & 0 deletions .github/linux/AppImageBuilder_arm64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ AppDir:
command: ./AppRun
AppImage:
arch: aarch64
comp: xz
update-information: guess
file_name: 'assfonts-gui-!!!VERSION!!!-aarch64-Linux.AppImage'
3 changes: 1 addition & 2 deletions .github/linux/AppImageBuilder_armv7l.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,9 @@ AppDir:
- sourceline: 'deb http://deb.debian.org/debian bookworm-updates main non-free-firmware'
include:
- libc-bin
- libc6-i386
- libgcc-s1:armhf
files:
include:
include:
- /lib/arm-linux-gnueabihf/libGLX.so.0
- /lib/arm-linux-gnueabihf/libGLdispatch.so.0
- /lib/arm-linux-gnueabihf/libOpenGL.so.0
Expand Down
2 changes: 2 additions & 0 deletions .github/linux/AppImageBuilder_x64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,6 @@ AppDir:
command: ./AppRun
AppImage:
arch: x86_64
comp: xz
update-information: guess
file_name: 'assfonts-gui-!!!VERSION!!!-x86_64-Linux.AppImage'
31 changes: 31 additions & 0 deletions .github/windows/CMakeUserPresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,19 @@
"strategy": "external"
}
},
{
"name": "x86",
"hidden": true,
"cacheVariables": {
"VCPKG_TARGET_TRIPLET": "x86-windows-static-md-release",
"CMAKE_SYSTEM_PROCESSOR": "X86",
"CMAKE_CROSSCOMPILING": "ON"
},
"architecture": {
"value": "x86",
"strategy": "external"
}
},
{
"name": "windows-x64",
"inherits": [
Expand All @@ -57,6 +70,14 @@
"arm64"
],
"binaryDir": "${sourceDir}/out/build/${presetName}"
},
{
"name": "windows-x86",
"inherits": [
"windows",
"x86"
],
"binaryDir": "${sourceDir}/out/build/${presetName}"
}
],
"buildPresets": [
Expand All @@ -79,6 +100,16 @@
"name": "windows-arm64-debug",
"configurePreset": "windows-arm64",
"configuration": "Debug"
},
{
"name": "windows-x86-release",
"configurePreset": "windows-x86",
"configuration": "Release"
},
{
"name": "windows-x86-debug",
"configurePreset": "windows-x86",
"configuration": "Debug"
}
]
}
165 changes: 88 additions & 77 deletions .github/workflows/build_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
include:
- { arch: x86_64, profile: x64 }
- { arch: aarch64, profile: arm64 }
- { arch: armhf, profile: armv7l }
steps:
- name: Maximize build space
uses: easimon/maximize-build-space@v10
Expand Down Expand Up @@ -170,89 +171,99 @@ jobs:
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
release:
runs-on: ubuntu-22.04
defaults:
run:
shell: bash
needs: [ build-linux, build-windows, build-macos ]
if: github.event_name == 'release'
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 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 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 Linux armhf
uses: actions/download-artifact@v4
with:
name: release-Linux-armhf

# - name: download Windows aarch64
# uses: actions/download-artifact@v4
# with:
# name: release-Windows-aarch64
- name: download Windows x86_64
uses: actions/download-artifact@v4
with:
name: release-Windows-x86_64

# - name: download macOS x86_64
# uses: actions/download-artifact@v4
# with:
# name: release-macOS-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: 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: 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 }}-armhf-Linux ./bin/assfonts
cp -f assfonts-gui-${{ github.ref_name }}-armhf-Linux.AppImage assfonts-gui.AppImage
tar -czvf assfonts-${{ github.ref_name }}-armhf-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 }}-armhf-Linux assfonts-gui-${{ github.ref_name }}-armhf-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: 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
- 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

0 comments on commit f8e5faa

Please sign in to comment.