Skip to content

Commit

Permalink
ci: add some settings for release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaricchi committed Sep 30, 2023
1 parent fb6515f commit 5154db3
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 20 deletions.
51 changes: 43 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,35 @@ on:
inputs:
custom-ref:
required: false
description: "Input git-ref to build as a test release"
description: "Build release from git-ref:"
developer:
default: false
type: boolean
description: "Developer build"
linux-x64:
default: true
type: boolean
macos-x64-arm64:
default: true
type: boolean
windows-x64:
default: true
type: boolean
windows-x86:
default: true
type: boolean
emscripten:
default: true
type: boolean
switch:
default: true
type: boolean
schedule:
# run every Wednesday at 8AM EST
- cron: '0 8 * * 3'

env:
DEFAULT_REF: 'master'
MESON_VERSION: '0.63.3'
EM_VERSION: '3.1.44'
EM_CACHE_FOLDER: 'emsdk'
Expand All @@ -25,8 +48,10 @@ env:
jobs:
linux-release-build-x64:
name: "Linux (x64/Source)"
if: ${{ github.event.inputs.linux-x64 == 'true' }}
runs-on: ubuntu-20.04
steps:

- name: Install Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -70,7 +95,7 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0
ref: ${{ github.event.inputs.custom-ref }}
ref: ${{ github.event.inputs.custom-ref || env.GITHUB_REF || env.DEFAULT_REF }}

- name: Configure
run: >
Expand All @@ -83,6 +108,7 @@ jobs:
--native-file misc/ci/forcefallback.ini
--native-file misc/ci/linux-x86_64-build-release.ini
--prefix=$(pwd)/build-release
-Ddeveloper=${{ github.event.inputs.developer }}
- name: Set Package Version
run: |
Expand Down Expand Up @@ -140,6 +166,7 @@ jobs:

macos-release-build-universal:
name: macOS (Universal)
if: ${{ github.event.inputs.macos-x64-arm64 == 'true' }}
runs-on: macos-12
steps:
- name: Install Tools
Expand Down Expand Up @@ -167,14 +194,14 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0
ref: ${{ github.event.inputs.custom-ref }}
ref: ${{ github.event.inputs.custom-ref || env.GITHUB_REF || env.DEFAULT_REF }}

- name: Configure
run: |
git config --global --add safe.directory $(pwd)
git fetch --force --tags
$(pwd)/scripts/macos_configure_env.sh $(pwd)/build-release/ $(pwd)
$(pwd)/scripts/macos_setup_universal.sh
$(pwd)/scripts/macos_setup_universal.sh -Ddeveloper=${{ github.event.inputs.developer }}
shell: bash

- name: Set Package Version
Expand Down Expand Up @@ -217,6 +244,7 @@ jobs:

windows-release-build-x64:
name: Windows (x64)
if: ${{ github.event.inputs.windows-x64 == 'true' }}
runs-on: ubuntu-latest
container: taiseiproject/windows-toolkit:20230929
steps:
Expand All @@ -231,7 +259,7 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0
ref: ${{ github.event.inputs.custom-ref }}
ref: ${{ github.event.inputs.custom-ref || env.GITHUB_REF || env.DEFAULT_REF }}

- name: Checkout ANGLE DLLs
uses: actions/checkout@v3
Expand All @@ -252,6 +280,7 @@ jobs:
--cross-file misc/ci/forcefallback.ini
--cross-file misc/ci/windows-llvm_mingw-x86_64-build-release.ini
--prefix=$(pwd)/build-release
-Ddeveloper=${{ github.event.inputs.developer }}
- name: Set Package Version
run: |
Expand Down Expand Up @@ -299,6 +328,7 @@ jobs:

windows-release-build-x86:
name: Windows (x86)
if: ${{ github.event.inputs.windows-x86 == 'true' }}
runs-on: ubuntu-latest
container: taiseiproject/windows-toolkit:20230929
steps:
Expand All @@ -313,7 +343,7 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0
ref: ${{ github.event.inputs.custom-ref }}
ref: ${{ github.event.inputs.custom-ref || env.GITHUB_REF || env.DEFAULT_REF }}

- name: Checkout ANGLE DLLs
uses: actions/checkout@v3
Expand All @@ -334,6 +364,7 @@ jobs:
--cross-file misc/ci/forcefallback.ini
--cross-file misc/ci/windows-llvm_mingw-x86-build-release.ini
--prefix=$(pwd)/build-release
-Ddeveloper=${{ github.event.inputs.developer }}
- name: Set Package Version
run: |
Expand Down Expand Up @@ -381,6 +412,7 @@ jobs:

emscripten-release-build:
name: Emscripten
if: ${{ github.event.inputs.emscripten == 'true' }}
runs-on: ubuntu-20.04
steps:
- name: Install Python
Expand Down Expand Up @@ -415,7 +447,7 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0
ref: ${{ github.event.inputs.custom-ref }}
ref: ${{ github.event.inputs.custom-ref || env.GITHUB_REF || env.DEFAULT_REF }}

- name: Fetch Cached Emscripten SDK
id: emsdk-cache
Expand Down Expand Up @@ -455,6 +487,7 @@ jobs:
--cross-file misc/ci/emscripten-build.ini
--cross-file misc/ci/emscripten-ephemeral-ci.ini
--prefix=$(pwd)/build-release
-Ddeveloper=${{ github.event.inputs.developer }}
- name: Set Package Version
run: |
Expand Down Expand Up @@ -491,6 +524,7 @@ jobs:

switch-release-build:
name: Switch (ARM64)
if: ${{ github.event.inputs.switch == 'true' }}
runs-on: ubuntu-20.04
container: taiseiproject/switch-toolkit:20221226
steps:
Expand All @@ -505,7 +539,7 @@ jobs:
with:
submodules: 'recursive'
fetch-depth: 0
ref: ${{ github.event.inputs.custom-ref }}
ref: ${{ github.event.inputs.custom-ref || env.GITHUB_REF || env.DEFAULT_REF }}

- name: Configure
run: >
Expand All @@ -520,6 +554,7 @@ jobs:
--cross-file misc/ci/switch-options.ini
--cross-file misc/ci/switch-crossfile-ci.ini
--prefix=$(pwd)/build-release
-Ddeveloper=${{ github.event.inputs.developer }}
- name: Set Package Version
run: |
Expand Down
24 changes: 12 additions & 12 deletions scripts/macos_setup_universal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@ source $(pwd)/.mac_env

mkdir -p $MAC_BUILD_DIR/compiled $MESON_BUILD_ROOT_MACOS_COMBINED
meson setup \
--native-file $TAISEI_ROOT/misc/ci/common-options.ini \
--native-file $TAISEI_ROOT/misc/ci/forcefallback.ini \
--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
--native-file $TAISEI_ROOT/misc/ci/common-options.ini \
--native-file $TAISEI_ROOT/misc/ci/forcefallback.ini \
--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/common-options.ini \
--cross-file $TAISEI_ROOT/misc/ci/forcefallback.ini \
--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
--cross-file $TAISEI_ROOT/misc/ci/common-options.ini \
--cross-file $TAISEI_ROOT/misc/ci/forcefallback.ini \
--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 "$@"

0 comments on commit 5154db3

Please sign in to comment.