mirror of
https://github.com/ong19th/Citron.git
synced 2025-12-12 07:37:00 +00:00
Build script
This commit is contained in:
parent
7e58599d69
commit
a59557d8bb
3 changed files with 197 additions and 0 deletions
64
.github/workflows/citron_android_build_java21.yml
vendored
Normal file
64
.github/workflows/citron_android_build_java21.yml
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
name: Build Android Release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs: {}
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build for Android
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set Current Date as Env Variable
|
||||||
|
run: echo "CURRENT_DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup JDK 21
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '21'
|
||||||
|
distribution: 'temurin'
|
||||||
|
cache: gradle
|
||||||
|
|
||||||
|
- name: Prepare Vulkan SDK
|
||||||
|
uses: humbletim/setup-vulkan-sdk@v1.2.1
|
||||||
|
with:
|
||||||
|
vulkan-query-version: 1.3.224.1
|
||||||
|
vulkan-components: Glslang
|
||||||
|
vulkan-use-cache: true
|
||||||
|
|
||||||
|
- name: Disable vcpkg Metrics
|
||||||
|
run: ./externals/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||||
|
|
||||||
|
- name: Setup Android SDK
|
||||||
|
uses: amyu/setup-android@v4
|
||||||
|
with:
|
||||||
|
cache-disabled: true
|
||||||
|
# default: `${sdkVersion}-${buildToolsVersion}-${ndkVersion}-${cmakeVersion}-v4`
|
||||||
|
# Custom key for cache. It is invalid when `cache-disabled: true`
|
||||||
|
# cache-key: 'custom-cache-key'
|
||||||
|
sdk-version: 34
|
||||||
|
build-tools-version: 33.0.1
|
||||||
|
cmake-version: 3.22.1
|
||||||
|
ndk-version: 28.0.13004108
|
||||||
|
generate-job-summary: false
|
||||||
|
|
||||||
|
- name: Build APK with Gradle
|
||||||
|
run: |
|
||||||
|
cd src/android
|
||||||
|
chmod +x ./gradlew
|
||||||
|
./gradlew assembleRelease
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: ncipollo/release-action@v1.14.0
|
||||||
|
with:
|
||||||
|
name: ${{ env.CURRENT_DATE }}.${{ github.run_number }}
|
||||||
|
artifacts: ./src/android/app/build/outputs/apk/mainline/release/app-mainline-release.apk
|
||||||
|
tag: ${{ env.CURRENT_DATE }}.${{ github.run_number }}
|
||||||
|
commit: master
|
||||||
|
allowUpdates: true
|
||||||
|
replacesArtifacts: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
64
.github/workflows/citron_android_release_java17.yml
vendored
Normal file
64
.github/workflows/citron_android_release_java17.yml
vendored
Normal file
|
|
@ -0,0 +1,64 @@
|
||||||
|
name: Build Android Release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs: {}
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build for Android
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Set Current Date as Env Variable
|
||||||
|
run: echo "CURRENT_DATE=$(date +'%Y.%m.%d')" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup JDK 17
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
cache: gradle
|
||||||
|
|
||||||
|
- name: Prepare Vulkan SDK
|
||||||
|
uses: humbletim/setup-vulkan-sdk@v1.2.1
|
||||||
|
with:
|
||||||
|
vulkan-query-version: 1.3.224.1
|
||||||
|
vulkan-components: Glslang
|
||||||
|
vulkan-use-cache: true
|
||||||
|
|
||||||
|
- name: Disable vcpkg Metrics
|
||||||
|
run: ./externals/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||||
|
|
||||||
|
- name: Setup Android SDK
|
||||||
|
uses: amyu/setup-android@v4
|
||||||
|
with:
|
||||||
|
cache-disabled: true
|
||||||
|
# default: `${sdkVersion}-${buildToolsVersion}-${ndkVersion}-${cmakeVersion}-v4`
|
||||||
|
# Custom key for cache. It is invalid when `cache-disabled: true`
|
||||||
|
# cache-key: 'custom-cache-key'
|
||||||
|
sdk-version: 34
|
||||||
|
build-tools-version: 33.0.1
|
||||||
|
cmake-version: 3.22.1
|
||||||
|
ndk-version: 27.2.12479018
|
||||||
|
generate-job-summary: false
|
||||||
|
|
||||||
|
- name: Build APK with Gradle
|
||||||
|
run: |
|
||||||
|
cd src/android
|
||||||
|
chmod +x ./gradlew
|
||||||
|
./gradlew assembleRelease
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: ncipollo/release-action@v1.14.0
|
||||||
|
with:
|
||||||
|
name: ${{ env.CURRENT_DATE }}.${{ github.run_number }}
|
||||||
|
artifacts: ./src/android/app/build/outputs/apk/mainline/release/app-mainline-release.apk
|
||||||
|
tag: ${{ env.CURRENT_DATE }}.${{ github.run_number }}
|
||||||
|
commit: master
|
||||||
|
allowUpdates: true
|
||||||
|
replacesArtifacts: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
69
.github/workflows/citron_build.yml
vendored
Normal file
69
.github/workflows/citron_build.yml
vendored
Normal file
|
|
@ -0,0 +1,69 @@
|
||||||
|
name: Build Windows Release
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs: {}
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
name: Build for winOS-x64
|
||||||
|
runs-on: windows-latest
|
||||||
|
steps:
|
||||||
|
- name: Get Current Date
|
||||||
|
id: current_date
|
||||||
|
run: |
|
||||||
|
$CURRENT_DATE=& Get-Date -format yyyy.MM.dd
|
||||||
|
echo "CURRENT_DATE=$CURRENT_DATE" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Checkout Project
|
||||||
|
uses: actions/checkout@v4.2.2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Prepare Visual Studio
|
||||||
|
uses: actions/setup-dotnet@v4
|
||||||
|
with:
|
||||||
|
dotnet-version: 8.x
|
||||||
|
|
||||||
|
- name: Prepare Vulkan SDK
|
||||||
|
uses: humbletim/setup-vulkan-sdk@v1.2.1
|
||||||
|
with:
|
||||||
|
vulkan-query-version: 1.3.224.1
|
||||||
|
vulkan-components: Vulkan-Headers, Vulkan-Loader, Glslang
|
||||||
|
vulkan-use-cache: true
|
||||||
|
|
||||||
|
- name: Prepare Python
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: '3.13'
|
||||||
|
|
||||||
|
- name: Prepare CMake
|
||||||
|
uses: lukka/get-cmake@v3.31.6
|
||||||
|
|
||||||
|
- name: Configure CMake Build Location
|
||||||
|
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release
|
||||||
|
|
||||||
|
- name: Build Project
|
||||||
|
run: |
|
||||||
|
cmake -G "Visual Studio 17 2022" -A x64 -DCITRON_TESTS=OFF
|
||||||
|
cmake --build ${{github.workspace}}/build --config Release
|
||||||
|
|
||||||
|
- name: Archive Release
|
||||||
|
uses: thedoctor0/zip-release@0.7.5
|
||||||
|
with:
|
||||||
|
type: 'zip'
|
||||||
|
filename: 'Citron_winOS-x64.zip'
|
||||||
|
directory: '${{ github.workspace }}/build'
|
||||||
|
path: '${{ github.workspace }}/build/bin/Release'
|
||||||
|
exclusions: 'tests.exe'
|
||||||
|
recursive_exclusions: tests.exe
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
uses: ncipollo/release-action@v1.14.0
|
||||||
|
with:
|
||||||
|
name: ${{ env.CURRENT_DATE }}.${{ github.run_number }}
|
||||||
|
artifacts: "${{ github.workspace }}/build/*.zip"
|
||||||
|
tag: ${{ env.CURRENT_DATE }}.${{ github.run_number }}
|
||||||
|
commit: master
|
||||||
|
allowUpdates: true
|
||||||
|
replacesArtifacts: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue