chore: write github action
This commit is contained in:
69
.github/workflows/linux.yml
vendored
69
.github/workflows/linux.yml
vendored
@@ -0,0 +1,69 @@
|
||||
name: LibCmo Linux Build
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
linux-build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install Dependencies
|
||||
shell: bash
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y build-essential cmake git
|
||||
- name: Fetch YYCCommonplace
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'yyc12345/YYCCommonplace'
|
||||
ref: 'master'
|
||||
path: 'extern/YYCCommonplace'
|
||||
- name: Build YYCCommonplace
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/YYCCommonplace
|
||||
chmod +x ../../.github/scripts/yycc-linux.sh
|
||||
source ../../.github/scripts/yycc-linux.sh
|
||||
echo "YYCCommonplace_ROOT=$YYCCommonplace_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch ZLIB
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'madler/zlib'
|
||||
ref: 'v1.3.1'
|
||||
path: 'extern/zlib'
|
||||
- name: Build ZLIB
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/zlib
|
||||
chmod +x ../../.github/scripts/zlib-linux.sh
|
||||
source ../../.github/scripts/zlib-linux.sh
|
||||
echo "ZLIB_ROOT=$ZLIB_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch STB
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'nothings/stb'
|
||||
ref: '2e2bef463a5b53ddf8bb788e25da6b8506314c08'
|
||||
path: 'extern/stb'
|
||||
- name: Build STB
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/stb
|
||||
chmod +x ../../.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
|
||||
- name: Upload Built Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: LibCmo-linux-build
|
||||
path: bin/install/*
|
||||
retention-days: 30
|
||||
64
.github/workflows/macos.yml
vendored
64
.github/workflows/macos.yml
vendored
@@ -0,0 +1,64 @@
|
||||
name: LibCmo macOS Build
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
jobs:
|
||||
macos-build:
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Fetch YYCCommonplace
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'yyc12345/YYCCommonplace'
|
||||
ref: 'master'
|
||||
path: 'extern/YYCCommonplace'
|
||||
- name: Build YYCCommonplace
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/YYCCommonplace
|
||||
chmod +x ../../.github/scripts/yycc-macos.sh
|
||||
source ../../.github/scripts/yycc-macos.sh
|
||||
echo "YYCCommonplace_ROOT=$YYCCommonplace_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch ZLIB
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'madler/zlib'
|
||||
ref: 'v1.3.1'
|
||||
path: 'extern/zlib'
|
||||
- name: Build ZLIB
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/zlib
|
||||
chmod +x ../../.github/scripts/zlib-macos.sh
|
||||
source ../../.github/scripts/zlib-macos.sh
|
||||
echo "ZLIB_ROOT=$ZLIB_ROOT" >> "$GITHUB_ENV"
|
||||
cd ../..
|
||||
- name: Fetch STB
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: 'nothings/stb'
|
||||
ref: '2e2bef463a5b53ddf8bb788e25da6b8506314c08'
|
||||
path: 'extern/stb'
|
||||
- name: Build STB
|
||||
shell: bash
|
||||
run: |
|
||||
cd extern/stb
|
||||
chmod +x ../../.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
|
||||
- name: Upload Built Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: LibCmo-macos-build
|
||||
path: bin/install/*
|
||||
retention-days: 30
|
||||
25
.github/workflows/windows.yml
vendored
25
.github/workflows/windows.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: YYCC Windows Build
|
||||
name: LibCmo Windows Build
|
||||
|
||||
on: [workflow_dispatch]
|
||||
|
||||
@@ -25,14 +25,9 @@ jobs:
|
||||
- name: Build YYCCommonplace
|
||||
shell: cmd
|
||||
run: |
|
||||
:: Enter directory
|
||||
cd extern/YYCCommonplace
|
||||
:: Build library
|
||||
..\..\.github\scripts\yycc-windows.bat
|
||||
:: Fetch install directory
|
||||
cd install
|
||||
echo set YYCCommonplace_ROOT=%CD% > ../../envs.bat
|
||||
cd ..
|
||||
call ..\..\.github\scripts\yycc-windows.bat
|
||||
echo set YYCCommonplace_ROOT=%YYCCommonplace_ROOT% > ../envs.bat
|
||||
cd ../..
|
||||
- name: Fetch ZLIB
|
||||
uses: actions/checkout@v4
|
||||
@@ -43,14 +38,9 @@ jobs:
|
||||
- name: Build ZLIB
|
||||
shell: cmd
|
||||
run: |
|
||||
:: Enter directory
|
||||
cd extern/zlib
|
||||
:: Build library
|
||||
..\..\.github\scripts\zlib-windows.bat
|
||||
:: Fetch install directory
|
||||
cd install
|
||||
echo set ZLIB_ROOT=%CD% >> ../../envs.bat
|
||||
cd ..
|
||||
echo set ZLIB_ROOT=%ZLIB_ROOT% >> ../envs.bat
|
||||
cd ../..
|
||||
- name: Fetch STB
|
||||
uses: actions/checkout@v4
|
||||
@@ -61,10 +51,9 @@ jobs:
|
||||
- name: Build STB
|
||||
shell: cmd
|
||||
run: |
|
||||
:: Enter directory
|
||||
cd extern/stb
|
||||
:: Fetch install directory
|
||||
echo set STB_ROOT=%CD% >> ../envs.bat
|
||||
..\..\.github\scripts\stb-windows.bat
|
||||
echo set STB_ROOT=%STB_ROOT% >> ../envs.bat
|
||||
cd ../..
|
||||
- name: Build LibCmo
|
||||
shell: cmd
|
||||
@@ -77,7 +66,7 @@ jobs:
|
||||
:: Extract saved environment variables
|
||||
call .\extern\envs.bat
|
||||
:: Build Project
|
||||
.\.github\script\windows.bat
|
||||
.\.github\scripts\windows.bat
|
||||
- name: Upload Built Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
|
||||
Reference in New Issue
Block a user