ci: Release Automation (#289)
* initial commit of release automation squashing commits Squashed commit of the following: commit c4f2a423a587201874229af541cd93e8096061fa Author: Alice D <alice@starwitch.productions> Date: Tue May 11 19:23:38 2021 -0400 fix changelogs and prevent no changelog from blocking release commit 5af6d66dc1d0f9842b42c85ac0fba346b080351a Author: Alice D <alice@starwitch.productions> Date: Tue May 11 18:53:47 2021 -0400 fix file extensions for sha256sum commit 0327bc5e3d4ba3b6fe9c66a8e50d1f05c0a6457b Author: Alice D <alice@starwitch.productions> Date: Tue May 11 18:43:03 2021 -0400 fix macos and linux commit 7065adf4691deec45ed39a160d795b6613b84df5 Author: Alice D <alice@starwitch.productions> Date: Tue May 11 18:32:17 2021 -0400 don't stomp over source zip commit 0df7be4a0072bdcd17d4fb7902e070c9e3f847b5 Author: Alice D <alice@starwitch.productions> Date: Tue May 11 18:25:19 2021 -0400 add correct file commit 0585258439c23fd1ddff77bd60442da73fc2b635 Author: Alice D <alice@starwitch.productions> Date: Tue May 11 18:21:06 2021 -0400 whoops commit e85623afd3ac6def2a128f03c56d7713679558be Author: Alice D <alice@starwitch.productions> Date: Tue May 11 18:09:07 2021 -0400 kfix env commit b98c0942c649430e62f5128bd578d1aa64190a7d Author: Alice D <alice@starwitch.productions> Date: Tue May 11 18:02:44 2021 -0400 fix missing output commit 1f9f6dff140a218c452ba0afe9207d4b95603b71 Author: Alice D <alice@starwitch.productions> Date: Tue May 11 17:59:20 2021 -0400 fix paths for zip commit 9e5358a8a33a08daf59968992e6b5790b559695e Author: Alice D <alice@starwitch.productions> Date: Tue May 11 17:44:03 2021 -0400 fix paths for zip commit a641521775069d746d7edcf3e114d83848a44b5a Author: Alice D <alice@starwitch.productions> Date: Tue May 11 17:31:23 2021 -0400 fix names and paths commit ed0efb972877aee9f407d3fbbeef7d4c4c0e67f6 Author: Alice D <alice@starwitch.productions> Date: Tue May 11 17:10:32 2021 -0400 remove relative paths commit 9948669744b3281b1f9340e696913b7c131ab92d Author: Alice D <alice@starwitch.productions> Date: Tue May 11 16:46:24 2021 -0400 add source compress, add GPG signing commit 38703f888541c7ae2256fcaaffe2fa858f0deda3 Author: Alice D <alice@starwitch.productions> Date: Mon May 10 16:59:06 2021 -0400 release fixes commit d6a811c50167697f15df130d41471348a1f58102 Author: Alice D <alice@starwitch.productions> Date: Mon May 10 00:21:15 2021 -0400 fix logging paths for emscripten and switch commit 140e64b62f065019cc7770fa2048a5608b3c14ef Author: Alice D <alice@starwitch.productions> Date: Mon May 10 00:19:11 2021 -0400 fix logging paths for emscripten and switch commit a3d5b94f5b5f4af33131730091dae6a6e8643a3a Author: Alice D <alice@starwitch.productions> Date: Mon May 10 00:07:34 2021 -0400 fix tag var commit eb537f5f62f7c796615e3ebc0b9752921a4b71ca Author: Alice D <alice@starwitch.productions> Date: Sun May 9 23:49:53 2021 -0400 ninja commit 81f60e540f8a64d9e0af8598c0f79913d7ac7983 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 20:38:38 2021 -0400 add Switch release builds commit 39f5403a8e4daa9c80272339d4fb076693e5c0a3 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 19:35:54 2021 -0400 modernize crossfile for switch commit 464d7e28e3cead6b279df2956c5539c430219894 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 16:41:53 2021 -0400 use my own image lol 3 commit e7061f9ba2a1b9952931f693da2c826a95fb3987 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 16:40:19 2021 -0400 use my own image lol 2 commit 86abdee991bef25538f5b7596fce22edb50dc753 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 16:39:45 2021 -0400 use my own image lol commit 196e84c5fc157b821277ccb3380870b33d7f0b3e Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:36:10 2021 -0400 add switch test build 12 commit 284c42c498d896640754792ce8a03d126b812446 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:34:03 2021 -0400 add switch test build 11 commit a1031bbe94902bd9dd98ec8784a290d1e5980943 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:32:51 2021 -0400 add switch test build 10 commit acc8a631f9ece695e3d59f55a9122fda661c56a6 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:32:06 2021 -0400 add switch test build 9 commit dab31a118a5d5ca2cdd06e398a2934ea026a3e3c Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:18:21 2021 -0400 add switch test build 8 commit 5cf25e70d5de4e8be966088e89a6854989061332 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:16:35 2021 -0400 add switch test build 8 commit b2b6237d21e77af737d5a2b3e7caeea30856f6db Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:14:32 2021 -0400 add switch test build 7 commit a3572de63495fbd2c195b23179295df523d0a7b2 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:03:47 2021 -0400 add switch test build 6 commit fb4f5665103522557ecd56f64d2025ac49ede0cb Author: Alice D <alice@starwitch.productions> Date: Sun May 9 15:00:42 2021 -0400 add switch test build 5 commit b734b245751445a0ddd7c87d3cb8eda1520bd2a2 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 14:58:50 2021 -0400 add switch test build 4 commit 373cb1b4ba02da312d4c634bfaadbdf9c0ec4028 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 14:56:38 2021 -0400 add switch test build 2 commit 9fb48d5faa36f10937badf8a40230f6672f6833f Author: Alice D <alice@starwitch.productions> Date: Sun May 9 14:54:02 2021 -0400 add switch test build commit 4d6b553d3b8a67a9b1846611a6112359243e73e6 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 13:46:22 2021 -0400 clean up some names commit ac9a4fb28312cd332ea704a196e7c8fc3e8da6d0 Author: Alice D <alice@starwitch.productions> Date: Sun May 9 11:06:06 2021 -0400 revert to newer image commit 9bb9cd1c142976d2d074ff46b3c325026a2efbb4 Author: Alice D <alice@starwitch.productions> Date: Sat May 8 17:19:49 2021 -0400 use older version with llvm 11.0 to see if it fixes an x86 compile crash commit f0494b30ccb42cd0825dc8fe4cac80997262a5b2 Author: Alice D <alice@starwitch.productions> Date: Sat May 8 16:33:48 2021 -0400 fix some artifact paths, add tag to emscripten commit 1a1f5cb56db04944feab1210a6df51a67d0108d0 Author: Alice D <alice@starwitch.productions> Date: Sat May 8 16:17:03 2021 -0400 fix some typos commit 5109a8690543919acf04db44cefbb1fe2b4aa546 Author: Alice D <alice@starwitch.productions> Date: Sat May 8 16:08:04 2021 -0400 fix name commit 82904ffeac1b3413a3b3c4f3f081c062532ad6d4 Author: Alice D <alice@starwitch.productions> Date: Sat May 8 15:27:38 2021 -0400 add emscripten publish, and ANGLE repo pull commit 5a12078946a24bf32dd924d8220630d67e727f28 Author: Alice D <alice@starwitch.productions> Date: Fri May 7 20:11:26 2021 -0400 emscripten nightly 5 commit 28ad212f5d56f64bc7e1c27f634800064a9cf6dd Author: Alice D <alice@starwitch.productions> Date: Fri May 7 19:37:13 2021 -0400 emscripten nightly 4 commit 954ab3391ffd61149e4b3728ecf137dcd6c37efd Author: Alice D <alice@starwitch.productions> Date: Fri May 7 19:12:56 2021 -0400 emscripten nightly 3 commit 9330ba810cec1fd15d5f066199aa783f8b3f3f5c Author: Alice D <alice@starwitch.productions> Date: Fri May 7 18:50:35 2021 -0400 emscripten nightly 2 commit eae34ee5d8e0b271912d0d04ccae11fe0c3b4c0c Author: Alice D <alice@starwitch.productions> Date: Fri May 7 18:48:09 2021 -0400 emscripten nightly commit 685121646d559a54487e6305e5f7acbbcd36f015 Author: Alice D <alice@starwitch.productions> Date: Fri May 7 17:57:26 2021 -0400 fix style commit 5673129d410887fcf940a6e35ed36f3cf81bd83a Author: Alice D <alice@starwitch.productions> Date: Fri May 7 17:55:58 2021 -0400 rename back to original commit 01db06e6006a44bc62f834fe40b029fdb085b0e5 Author: Alice D <alice@starwitch.productions> Date: Fri May 7 17:04:07 2021 -0400 emscripten build test 2 commit b2151f0f97bf7e1370ebc1ed7524f2941e794ed9 Author: Alice D <alice@starwitch.productions> Date: Fri May 7 17:00:49 2021 -0400 emscripten build test commit 8c2a29efc21f2f03d273a2ddd56eb7ea9716ea2c Author: Alice D <alice@starwitch.productions> Date: Fri May 7 16:21:46 2021 -0400 fix SDL2 werror commit fc8c11cfe22eb5112ef0f9c8d053373e93f232bd Author: Alice D <alice@starwitch.productions> Date: Fri May 7 15:37:08 2021 -0400 fix machine files for basis_universal commit f8c2e661ccb813a8222f4a87c0f9b8386bb3e865 Author: Alice D <alice@starwitch.productions> Date: Fri May 7 15:06:28 2021 -0400 bump meson to 0.56.2 commit e7eed9330adad62be8334919a4a51df0e7e15588 Author: Alice D <alice@starwitch.productions> Date: Fri May 7 13:27:41 2021 -0400 fix paths commit d31b1f673b139d6c3ece6f3a96f3607ec19cc8a1 Author: Alice D <alice@starwitch.productions> Date: Thu May 6 20:12:13 2021 -0400 fix race condition commit c62df468a930f2b7bafbd5022ae5123f64b6b31f Author: Alice D <alice@starwitch.productions> Date: Thu May 6 19:05:09 2021 -0400 fix path commit 33bd03589236b45afbf3cbe1dc47346133214c51 Author: Alice D <alice@starwitch.productions> Date: Thu May 6 18:50:50 2021 -0400 ??? commit d9acdce134354d390283b15926d7924c705b948e Author: Alice D <alice@starwitch.productions> Date: Sat May 1 16:11:23 2021 -0400 version for testing commit f9ba7ecf124881168714326926bb091d4f201af5 Author: Alice D <alice@starwitch.productions> Date: Fri May 7 12:53:28 2021 -0400 fix paths commit 981f4022b2158ada0d76e938a7dc13bcf7192635 Author: Alice D <alice@starwitch.productions> Date: Fri May 7 12:29:18 2021 -0400 hopefully fixing emscripten by moving to Linux build commit 6abb7cc524ac07ac421588ea9b7a77ec1a8f9471 Author: Alice D <alice@starwitch.productions> Date: Thu May 6 17:53:31 2021 -0400 fix path for file_packager commit c565173e7987b9745cecc158a871e573774612e8 Author: Alice D <alice@starwitch.productions> Date: Thu May 6 17:34:33 2021 -0400 native -> cross commit 4b19afa3ee4fd01a33bc523c2a7b1dffcf9c873b Author: Alice D <alice@starwitch.productions> Date: Thu May 6 17:32:24 2021 -0400 more emscripten changes commit a1530a28abaff33cdcd509acc83ad815cabbbbfe Author: Alice D <alice@starwitch.productions> Date: Thu May 6 17:05:05 2021 -0400 move to latest for emscripten commit 4af45358e51c27ce29e1b8fff3e7d6c2ac472bf2 Author: Alice D <alice@starwitch.productions> Date: Thu May 6 16:09:28 2021 -0400 add emscripten CI, add labels to CI jobs commit 27b7c2c412661fca20715b6789e1be9fb72d0bd0 Author: Alice D <alice@starwitch.productions> Date: Thu May 6 13:59:43 2021 -0400 clean up machine files commit c8172ab4b0a79e3ec2b7e07a9fb358774d9eeb80 Author: Alice D <alice@starwitch.productions> Date: Mon May 3 15:43:32 2021 -0400 stashing emscripten machine file commit 3c61741626a6bb2c9a302af2782bf6306082f194 Author: Alice D <alice@starwitch.productions> Date: Sat May 1 16:25:32 2021 -0400 change macos version, fix windows paths for .zip commit 305e42a01afd46c2ab8b9453a5ae74b8064de285 Author: Alice D <alice@starwitch.productions> Date: Sat May 1 16:08:49 2021 -0400 add experimental macOS Apple Silicon build/release commit 75fb7151bc9e3053bd195f7197a0a8af6fc11134 Author: Alice D <alice@starwitch.productions> Date: Fri Apr 30 19:57:47 2021 -0400 add windows x86 build add, .zip packaging, tune macOS build commit 58f3e734b9fc2b5163e80ab7b46f1a391dd3f8bb Author: Alice D <alice@starwitch.productions> Date: Fri Apr 30 00:34:50 2021 -0400 delete dockerfiles, moved to different PR squashing commits fix compile issue for x86 windows builds re-enable x86 builds fix markdown path [skip ci] fix sha256sum extensions [skip ci] change publish pipeline name [skip ci] re-enable ARM64 macos builds revert CI tests in forked branch, wait until merged in main repo remove dockerignore bump emsdk to 2.0.21 remove emscripten nightly, moving to another PR [skip ci] fix merge issue preemptive PR changes, make it more readable improve GHP example move to project-owned Docker image [skip ci] change pipeline name [skip ci] * fix wildcards for branches [skip ci] * fetch tags manually * fix github checkout issue * remove unncessary match [skip ci] * initial PR changes to make things more streamlined * one line change to test builds more tag shenanigans remove unneccessary step modernize add release_files add release_files fix builds (hopefully) fix builds (hopefully 2) * fix typo * make paths more explicit * fixes * add token * add ref * fix ref * fix emscripten tests [skip ci] * bump switch image * slight fixes to scripts * fix -rc/-beta/etc tags in version script * add additional comments * typos and missing help * move publish.yml to own PR, improve release.yml * remove unneccessary python module * Revert "remove unneccessary python module" This reverts commit e7c3d6a5bcdcd15e94d91b79a2139221777ce4b6. * rebase and job name cleanup * fix merging * fix windows building issues * cleanup * bump ARM64 runner to macos-11 * bump Switch docker image version, and emsdk version * change path to ANGLE libraries * macos-11.0 -> macos-11 * clean up PR stuff * fix emscripten error * update macos script to handle universal binaries as well as releases * update for macos universal * update for macos universal 2 * MacOS universal release build * PR review * more smaller fixes * typo * more small fix * small fixes * small fixes 2 * PR review and refactoring * typos * python3.6 fix * use custom Ubuntu 20.04/llvm-mingw image * remove dead meson options * final touchups * CI test uses new image, also fix Emscripten builds again * updating and allowing for custom refs * squashing commits * get rid of version-guessing kludge * PR review
This commit is contained in:
parent
56254dda80
commit
b27f0f0a67
18 changed files with 702 additions and 43 deletions
24
.github/workflows/main.yml
vendored
24
.github/workflows/main.yml
vendored
|
@ -158,27 +158,8 @@ jobs:
|
|||
name: Windows (x64)
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
runs-on: ubuntu-20.04
|
||||
container: mstorsjo/llvm-mingw:20210423 # cross-compiler with mingw
|
||||
container: taiseiproject/windows-toolkit:20220221 # cross-compiler with mingw
|
||||
steps:
|
||||
- name: Install Tools
|
||||
run: >
|
||||
apt update || true
|
||||
|
||||
apt install -y -qq software-properties-common
|
||||
|
||||
add-apt-repository ppa:git-core/ppa -y
|
||||
|
||||
apt install -y -qq
|
||||
python3-docutils
|
||||
python3-pip
|
||||
git
|
||||
nsis
|
||||
|
||||
pip3 install
|
||||
meson==${{ env.MESON_VERSION }}
|
||||
ninja
|
||||
zstandard
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
|
@ -231,6 +212,7 @@ jobs:
|
|||
meson==${{ env.MESON_VERSION }}
|
||||
ninja
|
||||
zstandard
|
||||
python-gnupg # required as we call into gen-dist.py for Emscripten
|
||||
|
||||
- name: Fetch Cached Emscripten SDK
|
||||
id: emsdk-cache
|
||||
|
@ -286,7 +268,7 @@ jobs:
|
|||
name: Switch (ARM64)
|
||||
if: "!contains(github.event.head_commit.message, '[skip ci]')"
|
||||
runs-on: ubuntu-20.04
|
||||
container: taiseiproject/switch-toolkit:20210520
|
||||
container: taiseiproject/switch-toolkit:20210530
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
|
|
531
.github/workflows/release.yml
vendored
Normal file
531
.github/workflows/release.yml
vendored
Normal file
|
@ -0,0 +1,531 @@
|
|||
name: "Release Builds"
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v[0-9].[0-9]**
|
||||
tags:
|
||||
- v[0-9].[0-9]**
|
||||
- v[0-9].[0-9]**-**
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
custom-ref:
|
||||
required: false
|
||||
description: "Input git-ref to build as a test release"
|
||||
|
||||
env:
|
||||
MESON_VERSION: '0.56.2'
|
||||
EM_VERSION: '2.0.29'
|
||||
EM_CACHE_FOLDER: 'emsdk'
|
||||
TAISEI_NOPRELOAD: 0
|
||||
TAISEI_PRELOAD_REQUIRED: 1
|
||||
|
||||
jobs:
|
||||
linux-release-build-x64:
|
||||
name: "Linux (x64/Source)"
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Tools
|
||||
run: >
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
|
||||
|
||||
sudo apt update || true # debian cache is not atomic and can sometimes fail
|
||||
|
||||
sudo apt install -y -qq
|
||||
build-essential
|
||||
libsdl2-dev
|
||||
libx11-dev
|
||||
libwayland-dev
|
||||
python3-docutils
|
||||
gnupg
|
||||
gcc-10
|
||||
g++-10
|
||||
|
||||
sudo update-alternatives --install
|
||||
/usr/bin/gcc gcc /usr/bin/gcc-10 60 --slave
|
||||
/usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
pip install
|
||||
meson==${{ env.MESON_VERSION }}
|
||||
ninja
|
||||
zstandard
|
||||
python-gnupg
|
||||
|
||||
- name: Import GPG Key
|
||||
uses: taisei-project/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
|
||||
# NOTE: 'fetch-depth: 0' == "get all history", not "no history"
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.inputs.custom-ref }}
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
git fetch --force --tags # see: https://github.com/actions/checkout/issues/290
|
||||
|
||||
meson setup build/linux
|
||||
--native-file misc/ci/linux-x86_64-build-release.ini
|
||||
--prefix=$(pwd)/build-release
|
||||
|
||||
- name: Set Package Version
|
||||
run: |
|
||||
echo BUILD_VERSION=$($(pwd)/scripts/version.py) >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "Version set to ${{ env.BUILD_VERSION }}" # needs to be here as GITHUB_ENV doesn't update until the next step: https://github.com/github/docs/issues/7892
|
||||
meson compile -C build/linux --verbose
|
||||
meson install -C build/linux
|
||||
|
||||
- name: Unwanted Library Check
|
||||
run: $(pwd)/scripts/smoke-test-standalone-linux-exe.py $(pwd)/build-release/bin/taisei
|
||||
|
||||
- name: Run Test
|
||||
run: $(pwd)/build-release/bin/taisei -R $(pwd)/misc/ci/tests/test-replay.tsr
|
||||
env:
|
||||
TAISEI_NOPRELOAD: ${{ env.TAISEI_NOPRELOAD }}
|
||||
TAISEI_PRELOAD_REQUIRED: ${{ env.TAISEI_PRELOAD_REQUIRED }}
|
||||
|
||||
- name: Package (Binary)
|
||||
run: |
|
||||
ninja txz -C build/linux --verbose
|
||||
scripts/sign-release.py build/linux/Taisei-${{ env.BUILD_VERSION }}-linux-x86_64.tar.xz
|
||||
|
||||
- name: Upload Artifact (Binary)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: linux-x86_64-${{ env.BUILD_VERSION }}-txz
|
||||
path: build/linux/Taisei-${{ env.BUILD_VERSION }}-linux-x86_64.tar.xz*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Package (Source)
|
||||
run: |
|
||||
meson rewrite kwargs set project / version ${{ env.BUILD_VERSION }} # meson dist uses 'project.version' instead of 'git describe' for the tag to use, so this overwrites it as a workaround
|
||||
meson --reconfigure build/linux
|
||||
meson dist -C build/linux --no-tests # disable test build, since we already know it compiles
|
||||
scripts/sign-release.py build/linux/meson-dist/taisei-${{ env.BUILD_VERSION }}.tar.xz
|
||||
|
||||
- name: Upload Artifact (Source)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: source-${{ env.BUILD_VERSION }}-txz
|
||||
path: build/linux/meson-dist/taisei-${{ env.BUILD_VERSION }}.tar.xz*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Log
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: taisei_x64_linux_release_log
|
||||
path: build/linux/meson-logs/meson-log.txt
|
||||
if-no-files-found: warn
|
||||
|
||||
macos-release-build-universal:
|
||||
name: macOS (Universal)
|
||||
runs-on: macos-12
|
||||
steps:
|
||||
- name: Install Tools
|
||||
run: >
|
||||
brew install
|
||||
docutils
|
||||
pygments
|
||||
create-dmg
|
||||
|
||||
pip3 install
|
||||
meson==${{ env.MESON_VERSION }}
|
||||
ninja
|
||||
zstandard
|
||||
python-gnupg
|
||||
shell: bash
|
||||
|
||||
- name: Import GPG Key
|
||||
uses: taisei-project/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.inputs.custom-ref }}
|
||||
|
||||
- name: Configure
|
||||
run: |
|
||||
git fetch --force --tags
|
||||
$(pwd)/scripts/macos_configure_env.sh $(pwd)/build-release/ $(pwd)
|
||||
$(pwd)/scripts/macos_setup_universal.sh
|
||||
shell: bash
|
||||
|
||||
- name: Set Package Version
|
||||
run: |
|
||||
echo BUILD_VERSION=$($(pwd)/scripts/version.py) >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "Version set to ${{ env.BUILD_VERSION }}"
|
||||
$(pwd)/scripts/macos_build_universal.sh ${{ env.BUILD_VERSION }}
|
||||
shell: bash
|
||||
|
||||
- name: Sign Release
|
||||
run: |
|
||||
scripts/sign-release.py build-release/compiled/Taisei-${{ env.BUILD_VERSION }}-universal.dmg
|
||||
shell: bash
|
||||
|
||||
- name: Run Test
|
||||
run: $(pwd)/build-release/compiled/combined/Taisei.app/Contents/MacOS/Taisei -R $(pwd)/misc/ci/tests/test-replay.tsr
|
||||
env:
|
||||
TAISEI_NOPRELOAD: ${{ env.TAISEI_NOPRELOAD }}
|
||||
TAISEI_PRELOAD_REQUIRED: ${{ env.TAISEI_PRELOAD_REQUIRED }}
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: macos-universal-${{ env.BUILD_VERSION }}-dmg
|
||||
path: build-release/compiled/Taisei-${{ env.BUILD_VERSION }}-universal.dmg*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Log
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: taisei_macos_universal_release_log
|
||||
path: build-release/*/meson-logs/meson-log.txt
|
||||
if-no-files-found: warn
|
||||
|
||||
windows-release-build-x64:
|
||||
name: Windows (x64)
|
||||
runs-on: ubuntu-20.04
|
||||
container: taiseiproject/windows-toolkit:20220221
|
||||
steps:
|
||||
- name: Import GPG Key
|
||||
uses: taisei-project/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.inputs.custom-ref }}
|
||||
|
||||
- name: Checkout ANGLE DLLs
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: taisei-project/angle-compiled
|
||||
path: angle-compiled
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
git fetch --force --tags
|
||||
|
||||
meson setup build/windows
|
||||
-Dangle_libegl=$(pwd)/angle-compiled/lib/Windows-x64-dll/libEGL.dll
|
||||
-Dangle_libgles=$(pwd)/angle-compiled/lib/Windows-x64-dll/libGLESv2.dll
|
||||
--cross-file misc/ci/windows-llvm_mingw-x86_64-build-release.ini
|
||||
--prefix=$(pwd)/build-release
|
||||
|
||||
- name: Set Package Version
|
||||
run: |
|
||||
echo BUILD_VERSION=$($(pwd)/scripts/version.py) >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "Version set to ${{ env.BUILD_VERSION }}"
|
||||
meson compile -C build/windows
|
||||
|
||||
- name: Package (EXE)
|
||||
run: |
|
||||
ninja nsis -C build/windows --verbose
|
||||
scripts/sign-release.py build/windows/Taisei-${{ env.BUILD_VERSION }}-setup-x86_64.exe
|
||||
|
||||
- name: Upload Artifact (EXE)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: windows-x86_64-${{ env.BUILD_VERSION }}-setup-exe
|
||||
path: build/windows/Taisei-${{ env.BUILD_VERSION }}-setup-x86_64.exe*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Package (ZIP)
|
||||
run: |
|
||||
ninja zip -C build/windows --verbose
|
||||
scripts/sign-release.py build/windows/Taisei-${{ env.BUILD_VERSION }}-windows-x86_64.zip
|
||||
|
||||
- name: Upload Artifact (ZIP)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: windows-x86_64-${{ env.BUILD_VERSION }}-zip
|
||||
path: build/windows/Taisei-${{ env.BUILD_VERSION }}-windows-x86_64.zip*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Log
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: taisei_windows_x64_release_log
|
||||
path: build/windows/meson-logs/meson-log.txt
|
||||
if-no-files-found: warn
|
||||
|
||||
windows-release-build-x86:
|
||||
name: Windows (x86)
|
||||
runs-on: ubuntu-20.04
|
||||
container: taiseiproject/windows-toolkit:20220221
|
||||
steps:
|
||||
- name: Import GPG Key
|
||||
uses: taisei-project/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.inputs.custom-ref }}
|
||||
|
||||
- name: Checkout ANGLE DLLs
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: taisei-project/angle-compiled
|
||||
path: angle-compiled
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
git fetch --force --tags
|
||||
|
||||
meson setup build/windows
|
||||
-Dangle_libegl=$(pwd)/angle-compiled/lib/Windows-x86-dll/libEGL.dll
|
||||
-Dangle_libgles=$(pwd)/angle-compiled/lib/Windows-x86-dll/libGLESv2.dll
|
||||
--cross-file misc/ci/windows-llvm_mingw-x86-build-release.ini
|
||||
--prefix=$(pwd)/build-release
|
||||
|
||||
- name: Set Package Version
|
||||
run: |
|
||||
echo BUILD_VERSION=$($(pwd)/scripts/version.py) >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "Version set to ${{ env.BUILD_VERSION }}"
|
||||
meson compile -C build/windows
|
||||
|
||||
- name: Package (EXE)
|
||||
run: |
|
||||
ninja nsis -C build/windows --verbose
|
||||
scripts/sign-release.py build/windows/Taisei-${{ env.BUILD_VERSION }}-setup-x86.exe
|
||||
|
||||
- name: Upload Artifact (EXE)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: windows-x86-${{ env.BUILD_VERSION }}-setup-exe
|
||||
path: build/windows/Taisei-${{ env.BUILD_VERSION }}-setup-x86.exe*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Package (ZIP)
|
||||
run: |
|
||||
ninja zip -C build/windows --verbose
|
||||
scripts/sign-release.py build/windows/Taisei-${{ env.BUILD_VERSION }}-windows-x86.zip
|
||||
|
||||
- name: Upload Artifact (ZIP)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: windows-x86-${{ env.BUILD_VERSION }}-zip
|
||||
path: build/windows/Taisei-${{ env.BUILD_VERSION }}-windows-x86.zip*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Log
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: taisei_windows_x86_release_log
|
||||
path: build/windows/meson-logs/meson-log.txt
|
||||
if-no-files-found: warn
|
||||
|
||||
emscripten-release-build:
|
||||
name: Emscripten
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Install Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
- name: Install Tools
|
||||
run: >
|
||||
sudo apt update || true
|
||||
|
||||
sudo apt install -y -qq
|
||||
python3-docutils
|
||||
python3-pip
|
||||
git
|
||||
gnupg
|
||||
|
||||
pip install
|
||||
meson==${{ env.MESON_VERSION }}
|
||||
ninja
|
||||
zstandard
|
||||
python-gnupg
|
||||
|
||||
- name: Import GPG Key
|
||||
uses: taisei-project/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.inputs.custom-ref }}
|
||||
|
||||
- name: Fetch Cached Emscripten SDK
|
||||
id: emsdk-cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: ${{ env.EM_CACHE_FOLDER }}
|
||||
key: ${{ env.EM_VERSION }}-${{ runner.os }}
|
||||
|
||||
- name: Install Emscripten SDK
|
||||
if: steps.emsdk-cache.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
rm -rf ./${{ env.EM_CACHE_FOLDER }}/
|
||||
git clone https://github.com/emscripten-core/emsdk.git
|
||||
${{ env.EM_CACHE_FOLDER }}/emsdk install ${{ env.EM_VERSION }}
|
||||
${{ env.EM_CACHE_FOLDER }}/emsdk activate ${{ env.EM_VERSION }}
|
||||
|
||||
- name: Verify Emscripten SDK
|
||||
run: |
|
||||
source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh
|
||||
emcc -v
|
||||
tee misc/ci/emscripten-ephemeral-ci.ini <<EOF >/dev/null
|
||||
[constants]
|
||||
toolchain = '$(pwd)/${{ env.EM_CACHE_FOLDER }}/upstream/emscripten/'
|
||||
EOF
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
git fetch --force --tags
|
||||
|
||||
source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh
|
||||
|
||||
meson setup build/emscripten
|
||||
--cross-file misc/ci/emscripten-build.ini
|
||||
--cross-file misc/ci/emscripten-ephemeral-ci.ini
|
||||
--prefix=$(pwd)/build-release
|
||||
|
||||
- name: Set Package Version
|
||||
run: |
|
||||
echo BUILD_VERSION=$($(pwd)/scripts/version.py) >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "Version set to ${{ env.BUILD_VERSION }}"
|
||||
source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh
|
||||
meson compile -C build/emscripten --verbose
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
source ${{ env.EM_CACHE_FOLDER }}/emsdk_env.sh
|
||||
ninja txz -C build/emscripten --verbose
|
||||
scripts/sign-release.py build/emscripten/Taisei-${{ env.BUILD_VERSION }}-emscripten-wasm32.tar.xz
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: emscripten-wasm32-${{ env.BUILD_VERSION }}-txz
|
||||
path: build/emscripten/Taisei-${{ env.BUILD_VERSION }}-emscripten-wasm32.tar.xz*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Log
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: taisei_emscripten_build_log
|
||||
path: build/emscripten/meson-logs/meson-log.txt
|
||||
if-no-files-found: warn
|
||||
|
||||
switch-release-build:
|
||||
name: Switch (ARM64)
|
||||
runs-on: ubuntu-20.04
|
||||
container: taiseiproject/switch-toolkit:20210829
|
||||
steps:
|
||||
- name: Import GPG Key
|
||||
uses: taisei-project/ghaction-import-gpg@v5
|
||||
with:
|
||||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||
passphrase: ${{ secrets.GPG_PASSPHRASE }}
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
fetch-depth: 1
|
||||
ref: ${{ github.event.inputs.custom-ref }}
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
git fetch --force --tags
|
||||
|
||||
switch/crossfile.sh > misc/ci/switch-crossfile-ci.ini
|
||||
|
||||
meson setup build/nx
|
||||
--cross-file=misc/ci/switch-crossfile-ci.ini
|
||||
--prefix=$(pwd)/build-release
|
||||
|
||||
- name: Set Package Version
|
||||
run: |
|
||||
echo BUILD_VERSION=$($(pwd)/scripts/version.py) >> $GITHUB_ENV
|
||||
shell: bash
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
echo "Version set to ${{ env.BUILD_VERSION }}"
|
||||
meson compile -C build/nx --verbose
|
||||
|
||||
- name: Package
|
||||
run: |
|
||||
ninja zip -C build/nx --verbose
|
||||
scripts/sign-release.py build/nx/Taisei-${{ env.BUILD_VERSION }}-switch-aarch64.zip
|
||||
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
if: success()
|
||||
with:
|
||||
name: switch-aarch64-${{ env.BUILD_VERSION }}-zip
|
||||
path: build/nx/Taisei-${{ env.BUILD_VERSION }}-switch-aarch64.zip*
|
||||
if-no-files-found: error
|
||||
|
||||
- name: Upload Log
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: taisei_switch_release_log
|
||||
path: build/nx/meson-logs/meson-log.txt
|
||||
if-no-files-found: warn
|
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,6 +1,9 @@
|
|||
build/
|
||||
build-release/
|
||||
winbuild/
|
||||
osxbuild/
|
||||
releases/
|
||||
emsdk/
|
||||
.ctagsdb
|
||||
.*DS_Store
|
||||
__pycache__
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
[constants]
|
||||
cflags = []
|
||||
ldflags = ['-v']
|
||||
# 'toolchain' must be supplied somehow
|
||||
# either replace this with the /absolute/path/to/emsdk
|
||||
# ... or supply a second machine file with this variable defined
|
||||
#toolchain = ''
|
||||
|
||||
[binaries]
|
||||
ar = toolchain / 'emar'
|
||||
|
|
|
@ -6,6 +6,7 @@ ldflags = []
|
|||
|
||||
[project options]
|
||||
deprecation_warnings = 'no-error'
|
||||
use_libcrypto = 'false'
|
||||
|
||||
[built-in options]
|
||||
c_args = cflags
|
||||
|
|
|
@ -43,6 +43,12 @@ werror = false
|
|||
[sdl2:built-in options]
|
||||
werror = false
|
||||
|
||||
[libpng:built-in options]
|
||||
werror = false
|
||||
|
||||
[libzip:built-in options]
|
||||
werror = false
|
||||
|
||||
[sdl2:project options]
|
||||
# neither are necessary for macOS, but SDL2 will compile against them if present on the system (homebrew)
|
||||
use_audio_pulseaudio = 'disabled'
|
||||
|
|
|
@ -28,6 +28,12 @@ werror = false
|
|||
[sdl2:built-in options]
|
||||
werror = false
|
||||
|
||||
[libpng:built-in options]
|
||||
werror = false
|
||||
|
||||
[libzip:built-in options]
|
||||
werror = false
|
||||
|
||||
[sdl2:project options]
|
||||
# neither are necessary for macOS, but SDL2 will compile against them if present on the system (homebrew)
|
||||
use_audio_pulseaudio = 'disabled'
|
||||
|
|
|
@ -9,6 +9,8 @@ from taiseilib.common import (
|
|||
run_main,
|
||||
)
|
||||
|
||||
from taiseilib.integrityfiles import gen_integrity_files, verify_integrity_files
|
||||
|
||||
from pathlib import (
|
||||
Path,
|
||||
PurePosixPath,
|
||||
|
@ -53,6 +55,13 @@ def main(args):
|
|||
default=None,
|
||||
)
|
||||
|
||||
# can be switched to a newer Bool method when the Windows builder updates its Python version
|
||||
parser.add_argument('--integrity-files',
|
||||
help='Generate integrity files',
|
||||
default=False,
|
||||
action='store_true',
|
||||
)
|
||||
|
||||
add_common_args(parser)
|
||||
args = parser.parse_args(args[1:])
|
||||
|
||||
|
@ -78,6 +87,13 @@ def main(args):
|
|||
archive = Path(archive)
|
||||
archive.rename(args.output)
|
||||
|
||||
if args.integrity_files:
|
||||
print('Generating integrity files for: {0}'.format(str(args.output)))
|
||||
gen_integrity_files(str(args.output))
|
||||
print("Successfully generated integrity files (.sig, .sha256sum)")
|
||||
verify_integrity_files(str(args.output))
|
||||
print("Successfully verified integrity files (.sig, .sha256sum)")
|
||||
|
||||
print("Generated distribution archive {}".format(str(args.output)))
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from taiseilib.tempinstall import temp_install
|
||||
from taiseilib.integrityfiles import gen_integrity_files, verify_integrity_files
|
||||
from taiseilib.common import run_main
|
||||
|
||||
from pathlib import Path
|
||||
|
@ -60,6 +61,12 @@ def main(args):
|
|||
help='Specify a pre-built directory instead of making a new one from the build directory (i.e: in the case of a universal image)',
|
||||
type=Path,
|
||||
nargs='?',
|
||||
)
|
||||
|
||||
parser.add_argument('--integrity-files',
|
||||
help='Generate integrity files (.sig, .sha256sum)',
|
||||
default=False,
|
||||
action=argparse.BooleanOptionalAction
|
||||
)
|
||||
|
||||
args = parser.parse_args(args[1:])
|
||||
|
@ -70,6 +77,13 @@ def main(args):
|
|||
else:
|
||||
package_dmg(args.installation, args.output)
|
||||
|
||||
if args.integrity_files:
|
||||
gen_integrity_files(args.output)
|
||||
print('\nSuccessfully generated integrity files (.sig, .sha256sum)')
|
||||
verify_integrity_files(args.output)
|
||||
print('\nSuccessfully verified integrity files (.sig, .sha256sum)')
|
||||
|
||||
print('\nPackage generated:', args.output)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
|
|
@ -1,25 +1,14 @@
|
|||
#!/usr/bin/env sh
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -z $1 || -z $2 ]]; then
|
||||
echo "Usage: macos_build_universal.sh [taisei/build] [taisei/]\n"
|
||||
source $(pwd)/.mac_env
|
||||
|
||||
if [[ -z $1 ]]; then
|
||||
echo "Usage: macos_build_universal.sh VERSION [--integrity-files]\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
export BUILD_DIR=$1
|
||||
export TAISEI_ROOT=$2
|
||||
export MESON_BUILD_ROOT_MACOS_X64=$BUILD_DIR/x64
|
||||
export MESON_BUILD_ROOT_MACOS_AARCH64=$BUILD_DIR/aarch64
|
||||
export MESON_BUILD_ROOT_MACOS_X64_COMPILED=$BUILD_DIR/compiled/x64
|
||||
export MESON_BUILD_ROOT_MACOS_AARCH64_COMPILED=$BUILD_DIR/compiled/aarch64
|
||||
export MESON_BUILD_ROOT_MACOS_COMBINED=$BUILD_DIR/compiled/combined
|
||||
export TAISEI_BIN_PATH=./Taisei.app/Contents/MacOS/Taisei
|
||||
|
||||
mkdir -p $BUILD_DIR/compiled $MESON_BUILD_ROOT_MACOS_COMBINED
|
||||
meson setup --native-file $TAISEI_ROOT/misc/ci/macos-x86_64-build-release.ini --prefix $MESON_BUILD_ROOT_MACOS_X64_COMPILED $MESON_BUILD_ROOT_MACOS_X64 $TAISEI_ROOT
|
||||
meson setup --cross-file $TAISEI_ROOT/misc/ci/macos-aarch64-build-release.ini --prefix $MESON_BUILD_ROOT_MACOS_AARCH64_COMPILED $MESON_BUILD_ROOT_MACOS_AARCH64 $TAISEI_ROOT
|
||||
|
||||
meson install -C $MESON_BUILD_ROOT_MACOS_X64
|
||||
meson install -C $MESON_BUILD_ROOT_MACOS_AARCH64
|
||||
|
||||
|
@ -27,6 +16,4 @@ cp -a $MESON_BUILD_ROOT_MACOS_X64_COMPILED/ $MESON_BUILD_ROOT_MACOS_COMBINED
|
|||
echo "Combining x64 and AArch64 binaries...\n"
|
||||
lipo -create -output $MESON_BUILD_ROOT_MACOS_COMBINED/$TAISEI_BIN_PATH $MESON_BUILD_ROOT_MACOS_X64_COMPILED/$TAISEI_BIN_PATH $MESON_BUILD_ROOT_MACOS_AARCH64_COMPILED/$TAISEI_BIN_PATH
|
||||
|
||||
TAISEI_VERSION=$($PWD/scripts/version.py)
|
||||
|
||||
$TAISEI_ROOT/scripts/macos-gen-dmg.py $BUILD_DIR/compiled/Taisei-$TAISEI_VERSION-universal.dmg $MESON_BUILD_ROOT_MACOS_X64 $MESON_BUILD_ROOT_MACOS_COMBINED
|
||||
$TAISEI_ROOT/scripts/macos-gen-dmg.py $MAC_BUILD_DIR/compiled/Taisei-$1-universal.dmg $MESON_BUILD_ROOT_MACOS_X64 $MESON_BUILD_ROOT_MACOS_COMBINED $2
|
||||
|
|
20
scripts/macos_configure_env.sh
Executable file
20
scripts/macos_configure_env.sh
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [[ -z $1 || -z $2 ]]; then
|
||||
echo "Usage: macos_configure_env.sh /path/to/taisei/build /path/to/taisei\n"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "export MAC_BUILD_DIR=$1" >> $(pwd)/.mac_env
|
||||
echo "export TAISEI_ROOT=$2" >> $(pwd)/.mac_env
|
||||
|
||||
source $(pwd)/.mac_env
|
||||
|
||||
echo "export MESON_BUILD_ROOT_MACOS_X64=$MAC_BUILD_DIR/x64" >> $(pwd)/.mac_env
|
||||
echo "export MESON_BUILD_ROOT_MACOS_AARCH64=$MAC_BUILD_DIR/aarch64" >> $(pwd)/.mac_env
|
||||
echo "export MESON_BUILD_ROOT_MACOS_X64_COMPILED=$MAC_BUILD_DIR/compiled/x64" >> $(pwd)/.mac_env
|
||||
echo "export MESON_BUILD_ROOT_MACOS_AARCH64_COMPILED=$MAC_BUILD_DIR/compiled/aarch64" >> $(pwd)/.mac_env
|
||||
echo "export MESON_BUILD_ROOT_MACOS_COMBINED=$MAC_BUILD_DIR/compiled/combined" >> $(pwd)/.mac_env
|
||||
echo "export TAISEI_BIN_PATH=./Taisei.app/Contents/MacOS/Taisei" >> $(pwd)/.mac_env
|
9
scripts/macos_setup_universal.sh
Executable file
9
scripts/macos_setup_universal.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
source $(pwd)/.mac_env
|
||||
|
||||
mkdir -p $MAC_BUILD_DIR/compiled $MESON_BUILD_ROOT_MACOS_COMBINED
|
||||
meson setup --native-file $TAISEI_ROOT/misc/ci/macos-x86_64-build-release.ini --prefix $MESON_BUILD_ROOT_MACOS_X64_COMPILED $MESON_BUILD_ROOT_MACOS_X64 $TAISEI_ROOT
|
||||
meson setup --cross-file $TAISEI_ROOT/misc/ci/macos-aarch64-build-release.ini --prefix $MESON_BUILD_ROOT_MACOS_AARCH64_COMPILED $MESON_BUILD_ROOT_MACOS_AARCH64 $TAISEI_ROOT
|
6
scripts/sign-release.py
Executable file
6
scripts/sign-release.py
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import taiseilib.common
|
||||
import taiseilib.integrityfiles
|
||||
|
||||
taiseilib.common.run_main(taiseilib.integrityfiles.main)
|
58
scripts/taiseilib/integrityfiles.py
Normal file
58
scripts/taiseilib/integrityfiles.py
Normal file
|
@ -0,0 +1,58 @@
|
|||
|
||||
import os
|
||||
import gnupg
|
||||
import hashlib
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
gpg = gnupg.GPG()
|
||||
|
||||
def check_for_key(gpg):
|
||||
if 'TAISEI_SIGN_KEY' in os.environ:
|
||||
# this can be an email address or a key ID
|
||||
sign_key = os.environ['TAISEI_SIGN_KEY']
|
||||
key_list = gpg.list_keys(keys=sign_key)
|
||||
if len(key_list) == 0:
|
||||
raise ValueError('TAISEI_SIGN_KEY: id specified was invalid or not found')
|
||||
return sign_key
|
||||
return None
|
||||
|
||||
def gen_integrity_files(archive):
|
||||
sign_key = check_for_key(gpg)
|
||||
|
||||
with open(archive, 'rb') as file:
|
||||
gpg.sign_file(file, keyid = sign_key, detach=True, output='{0}.sig'.format(archive))
|
||||
file.seek(0) # reset the read position in memory so the file can be "read()" again
|
||||
sha256output = '{0} {1}'.format(hashlib.sha256(file.read()).hexdigest(), archive.name)
|
||||
Path('{0}.sha256sum'.format(archive)).write_text(sha256output)
|
||||
|
||||
def verify_integrity_files(archive):
|
||||
sign_key = check_for_key(gpg)
|
||||
|
||||
with open('{0}.sig'.format(archive), 'rb') as sig:
|
||||
verified = gpg.verify_file(sig, archive)
|
||||
if not verified:
|
||||
raise ValueError('could not verify gpg signature on archive: {0}'.format(archive))
|
||||
elif not sign_key is None and sign_key != verified.key_id:
|
||||
raise ValueError('could not verify gpg signature on archive: {0}, key mismatch'.format(archive))
|
||||
|
||||
sha256input = Path('{0}.sha256sum'.format(archive)).read_text().strip()
|
||||
sha256output = '{0} {1}'.format(hashlib.sha256(archive.read_bytes()).hexdigest(), archive.name)
|
||||
if str(sha256input) != str(sha256output):
|
||||
raise ValueError('could not verify sha256sum on archive: {0}, mismatch: {1} (input) != {2} (output)'.format(archive, sha256input, sha256output))
|
||||
|
||||
def main(args):
|
||||
import argparse
|
||||
|
||||
parser = argparse.ArgumentParser(description = 'Generate integrity files for release.', prog = args[0])
|
||||
|
||||
parser.add_argument('archive', type=Path, nargs='?',
|
||||
help='Path to the archive you want to generate integrity files for (i.e: /path/to/Taisei-vx.y-release.tar.xz)')
|
||||
|
||||
args = parser.parse_args(args[1:])
|
||||
|
||||
if args.archive is None:
|
||||
raise ValueError('archive path not specified to generate integrity files')
|
||||
|
||||
gen_integrity_files(args.archive)
|
||||
verify_integrity_files(args.archive)
|
|
@ -7,7 +7,7 @@ import shlex
|
|||
import re
|
||||
|
||||
|
||||
class VerionFormatError(common.TaiseiError):
|
||||
class VersionFormatError(common.TaiseiError):
|
||||
pass
|
||||
|
||||
|
||||
|
@ -32,7 +32,7 @@ class Version(object):
|
|||
match = self.regex.match(version_str)
|
||||
|
||||
if match is None:
|
||||
raise VerionFormatError("Error: Malformed version string '{0}'. Please use the following format: [v]major[.minor[.patch]][-tweak][-extrainfo]".format(version_str))
|
||||
raise VersionFormatError("Error: Malformed version string '{0}'. Please use the following format: [v]major[.minor[.patch]][-tweak][-extrainfo]".format(version_str))
|
||||
|
||||
def mkint(val):
|
||||
if val is None:
|
||||
|
|
|
@ -15,6 +15,8 @@ from taiseilib.configure import (
|
|||
configure,
|
||||
)
|
||||
|
||||
from taiseilib.integrityfiles import gen_integrity_files, verify_integrity_files
|
||||
|
||||
from pathlib import (
|
||||
Path,
|
||||
PureWindowsPath,
|
||||
|
@ -48,6 +50,12 @@ def main(args):
|
|||
type=Path,
|
||||
)
|
||||
|
||||
parser.add_argument('--integrity-files',
|
||||
help='Generate integrity files for release (.sha256sum, .sig)',
|
||||
default=False,
|
||||
action='store_true',
|
||||
)
|
||||
|
||||
add_configure_args(parser)
|
||||
add_common_args(parser)
|
||||
|
||||
|
@ -91,6 +99,12 @@ def main(args):
|
|||
if proc.returncode != 0:
|
||||
raise MakeNSISError(proc.returncode)
|
||||
|
||||
if args.integrity_files:
|
||||
gen_integrity_files(args.variables['OUTPUT'])
|
||||
print("Successfully verified release files (.sig, .sha256sum)")
|
||||
verify_integrity_files(args.variables['OUTPUT'])
|
||||
print("Successfully verified release files (.sig, .sha256sum)")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
run_main(main)
|
||||
|
|
|
@ -320,7 +320,6 @@ if host_machine.system() == 'emscripten'
|
|||
em_link_args = [
|
||||
'-O@0@'.format(get_option('optimization')),
|
||||
'-s', 'ALLOW_MEMORY_GROWTH=1',
|
||||
'-s', 'ALLOW_UNIMPLEMENTED_SYSCALLS=0',
|
||||
'-s', 'ASYNCIFY_REMOVE=@0@'.format(','.join(asyncify_ignore)),
|
||||
'-s', 'AUTO_ARCHIVE_INDEXES=0',
|
||||
'-s', 'AUTO_JS_LIBRARIES=0',
|
||||
|
|
|
@ -33,6 +33,9 @@ pkgconfig = '$(bin_path pkg-config)'
|
|||
elf2nro = '$(which elf2nro)'
|
||||
nacptool = '$(which nacptool)'
|
||||
|
||||
[project options]
|
||||
deprecation_warnings = 'no-error'
|
||||
|
||||
[built-in options]
|
||||
c_args = [$(meson_arg_list $CPPFLAGS $CFLAGS)]
|
||||
c_link_args = [$(meson_arg_list $LDFLAGS $LIBS $ADDITIONAL_LINK_FLAGS)]
|
||||
|
|
Loading…
Reference in a new issue