chore: use new github action build layout
This commit is contained in:
3
.github/scripts/README.md
vendored
3
.github/scripts/README.md
vendored
@@ -1,3 +1,4 @@
|
||||
# GitHub Scripts
|
||||
|
||||
These scripts should be executed at the root directory of each project respectively.
|
||||
These script files should be only used by GitHub Action.
|
||||
These script files should be executed at the root directory of each project respectively.
|
||||
|
||||
4
.github/scripts/linux.sh
vendored
4
.github/scripts/linux.sh
vendored
@@ -1,10 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
YYCCommonplace_ROOT="${YYCCommonplace_ROOT:?YYCCommonplace_ROOT must be set}"
|
||||
STB_ROOT="${STB_ROOT:?STB_ROOT must be set}"
|
||||
ZLIB_ROOT="${ZLIB_ROOT:?ZLIB_ROOT must be set}"
|
||||
|
||||
# Create build directory and enter it
|
||||
mkdir bin
|
||||
cd bin
|
||||
|
||||
4
.github/scripts/macos.sh
vendored
4
.github/scripts/macos.sh
vendored
@@ -1,10 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
|
||||
YYCCommonplace_ROOT="${YYCCommonplace_ROOT:?YYCCommonplace_ROOT must be set}"
|
||||
STB_ROOT="${STB_ROOT:?STB_ROOT must be set}"
|
||||
ZLIB_ROOT="${ZLIB_ROOT:?ZLIB_ROOT must be set}"
|
||||
|
||||
# Create build directory and enter it
|
||||
mkdir bin
|
||||
cd bin
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
# Just directly record self as root directory
|
||||
set STB_ROOT=$(pwd)
|
||||
export STB_ROOT=$(pwd)
|
||||
@@ -1,2 +1,2 @@
|
||||
# Just directly record self as root directory
|
||||
set STB_ROOT=$(pwd)
|
||||
export STB_ROOT=$(pwd)
|
||||
@@ -17,7 +17,7 @@ cd ..
|
||||
|
||||
# Record install directory
|
||||
cd install
|
||||
set YYCCommonplace_ROOT=$(pwd)
|
||||
export YYCCommonplace_ROOT=$(pwd)
|
||||
cd ..
|
||||
|
||||
# Back to root directory
|
||||
@@ -17,7 +17,7 @@ cd ..
|
||||
|
||||
# Record install directory
|
||||
cd install
|
||||
set YYCCommonplace_ROOT=$(pwd)
|
||||
export YYCCommonplace_ROOT=$(pwd)
|
||||
cd ..
|
||||
|
||||
# Back to root directory
|
||||
@@ -7,7 +7,7 @@ mkdir install
|
||||
|
||||
# Record install directory first because build step require it
|
||||
cd install
|
||||
set ZLIB_ROOT=$(pwd)
|
||||
export ZLIB_ROOT=$(pwd)
|
||||
cd ..
|
||||
|
||||
# Build in Release mode
|
||||
@@ -7,7 +7,7 @@ mkdir install
|
||||
|
||||
# Record install directory first because build step require it
|
||||
cd install
|
||||
set ZLIB_ROOT=$(pwd)
|
||||
export ZLIB_ROOT=$(pwd)
|
||||
cd ..
|
||||
|
||||
# Build in Release mode
|
||||
18
.github/workflows/linux.yml
vendored
18
.github/workflows/linux.yml
vendored
@@ -24,8 +24,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/YYCCommonplace
|
||||
chmod +x ../../.github/scripts/yycc-linux.sh
|
||||
source ../../.github/scripts/yycc-linux.sh
|
||||
source ../../.github/scripts/yycc/linux.sh
|
||||
echo "YYCCommonplace_ROOT=$YYCCommonplace_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch ZLIB
|
||||
@@ -38,8 +37,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/zlib
|
||||
chmod +x ../../.github/scripts/zlib-linux.sh
|
||||
source ../../.github/scripts/zlib-linux.sh
|
||||
source ../../.github/scripts/zlib/linux.sh
|
||||
echo "ZLIB_ROOT=$ZLIB_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch STB
|
||||
@@ -52,18 +50,22 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/stb
|
||||
chmod +x ../../.github/scripts/stb-linux.sh
|
||||
source ../../.github/scripts/stb-linux.sh
|
||||
source ../../.github/scripts/stb/linux.sh
|
||||
echo "STB_ROOT=$STB_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Build LibCmo
|
||||
shell: bash
|
||||
run: |
|
||||
chmod +x ./.github/scripts/linux.sh
|
||||
./.github/scripts/linux.sh
|
||||
source ./.github/scripts/linux.sh
|
||||
- name: Upload Built Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: LibCmo-linux-build
|
||||
path: bin/install/*
|
||||
retention-days: 30
|
||||
- name: Upload Built ependencies
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: LibCmo-linux-dep
|
||||
path: extern/zlib/install/*
|
||||
retention-days: 30
|
||||
20
.github/workflows/macos.yml
vendored
20
.github/workflows/macos.yml
vendored
@@ -19,8 +19,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/YYCCommonplace
|
||||
chmod +x ../../.github/scripts/yycc-macos.sh
|
||||
source ../../.github/scripts/yycc-macos.sh
|
||||
source ../../.github/scripts/yycc/macos.sh
|
||||
echo "YYCCommonplace_ROOT=$YYCCommonplace_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch ZLIB
|
||||
@@ -33,8 +32,7 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/zlib
|
||||
chmod +x ../../.github/scripts/zlib-macos.sh
|
||||
source ../../.github/scripts/zlib-macos.sh
|
||||
source ../../.github/scripts/zlib/macos.sh
|
||||
echo "ZLIB_ROOT=$ZLIB_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch STB
|
||||
@@ -47,18 +45,22 @@ jobs:
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/stb
|
||||
chmod +x ../../.github/scripts/stb-macos.sh
|
||||
source ../../.github/scripts/stb-macos.sh
|
||||
source ../../.github/scripts/stb/macos.sh
|
||||
echo "STB_ROOT=$STB_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Build LibCmo
|
||||
shell: bash
|
||||
run: |
|
||||
chmod +x ./.github/scripts/macos.sh
|
||||
./.github/scripts/macos.sh
|
||||
source ./.github/scripts/macos.sh
|
||||
- name: Upload Built Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: LibCmo-macos-build
|
||||
path: bin/install/*
|
||||
retention-days: 30
|
||||
retention-days: 30
|
||||
- name: Upload Built ependencies
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: LibCmo-linux-dep
|
||||
path: extern/zlib/install/*
|
||||
retention-days: 30
|
||||
34
.github/workflows/windows.yml
vendored
34
.github/workflows/windows.yml
vendored
@@ -25,10 +25,10 @@ jobs:
|
||||
- name: Build YYCCommonplace
|
||||
shell: cmd
|
||||
run: |
|
||||
cd extern/YYCCommonplace
|
||||
call ..\..\.github\scripts\yycc-windows.bat
|
||||
echo set YYCCommonplace_ROOT=%YYCCommonplace_ROOT% > ../envs.bat
|
||||
cd ../..
|
||||
CD extern\YYCCommonplace
|
||||
CALL ..\..\.github\scripts\yycc\windows.bat
|
||||
ECHO SET YYCCommonplace_ROOT=%YYCCommonplace_ROOT% > ..\envs.bat
|
||||
CD ..\..
|
||||
- name: Fetch ZLIB
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -38,10 +38,10 @@ jobs:
|
||||
- name: Build ZLIB
|
||||
shell: cmd
|
||||
run: |
|
||||
cd extern/zlib
|
||||
..\..\.github\scripts\zlib-windows.bat
|
||||
echo set ZLIB_ROOT=%ZLIB_ROOT% >> ../envs.bat
|
||||
cd ../..
|
||||
CD extern/zlib
|
||||
..\..\.github\scripts\zlib\windows.bat
|
||||
ECHO SET ZLIB_ROOT=%ZLIB_ROOT% >> ..\envs.bat
|
||||
CD ..\..
|
||||
- name: Fetch STB
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
@@ -51,10 +51,10 @@ jobs:
|
||||
- name: Build STB
|
||||
shell: cmd
|
||||
run: |
|
||||
cd extern/stb
|
||||
..\..\.github\scripts\stb-windows.bat
|
||||
echo set STB_ROOT=%STB_ROOT% >> ../envs.bat
|
||||
cd ../..
|
||||
CD extern/stb
|
||||
..\..\.github\scripts\stb\windows.bat
|
||||
ECHO SET STB_ROOT=%STB_ROOT% >> ..\envs.bat
|
||||
CD ..\..
|
||||
- name: Build LibCmo
|
||||
shell: cmd
|
||||
run: |
|
||||
@@ -64,13 +64,19 @@ jobs:
|
||||
if not exist %VCVARS% set VCVARS="C:\Program Files\Microsoft Visual Studio\%VS%\Enterprise\VC\Auxiliary\Build\vcvarsall.bat"
|
||||
call %VCVARS% ${{ matrix.msvc_arch }}
|
||||
:: Extract saved environment variables
|
||||
call .\extern\envs.bat
|
||||
CALL .\extern\envs.bat
|
||||
:: Build Project
|
||||
.\.github\scripts\windows.bat
|
||||
CALL .\.github\scripts\windows.bat
|
||||
- name: Upload Built Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: LibCmo-windows-build
|
||||
path: bin/install/*
|
||||
retention-days: 30
|
||||
- name: Upload Built Dependencies
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: LibCmo-windows-dep
|
||||
path: extern/zlib/install/*
|
||||
retention-days: 30
|
||||
|
||||
Reference in New Issue
Block a user