mirror of
https://github.com/acidicoala/SmokeAPI.git
synced 2025-12-05 21:15:39 -05:00
Sync KoalaBox
This commit is contained in:
2
.github/workflows/dev-build.yml
vendored
2
.github/workflows/dev-build.yml
vendored
@@ -6,4 +6,4 @@ on:
|
||||
jobs:
|
||||
dev-build:
|
||||
name: '🚧 Development Build'
|
||||
uses: acidicoala/SmokeAPI/.github/workflows/build.yml@master
|
||||
uses: acidicoala/SmokeAPI/.github/workflows/matrix-build.yml@master
|
||||
|
||||
79
.github/workflows/kb-build.yml
vendored
79
.github/workflows/kb-build.yml
vendored
@@ -1,79 +0,0 @@
|
||||
name: Build
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
module:
|
||||
description: 'Module to be used in CMake config'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
os:
|
||||
description: '"Windows" or "Linux"'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
bitness:
|
||||
description: '32 or 64'
|
||||
required: true
|
||||
type: number
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: 🏗️ Build
|
||||
runs-on: ${{ inputs.os == 'Linux' && 'ubuntu-24.04' || 'windows-2025'}}
|
||||
container: ${{ inputs.os == 'Linux' && 'ghcr.io/acidicoala/koalabox:master' || '' }}
|
||||
env:
|
||||
BUILD_DIR: ${{ github.workspace }}/build
|
||||
C_COMPILER: ${{ inputs.os == 'Linux' && 'clang' || 'cl' }}
|
||||
CXX_COMPILER: ${{ inputs.os == 'Linux' && 'clang++' || 'cl' }}
|
||||
OUTPUT_PATH: ${{ inputs.os == 'Linux' && '*.so' || 'Release/*.dll' }}
|
||||
WIN_FLAGS: ${{ inputs.os == 'Windows' && inputs.bitness == 32 && '-A=Win32' || '' }}
|
||||
LINUX_FLAGS: ${{ inputs.os == 'Linux' && inputs.bitness == 32 && '-DCMAKE_C_FLAGS=-m32 -DCMAKE_CXX_FLAGS=-m32' || '' }}
|
||||
steps:
|
||||
# Fix dubious ownership errors in docker container
|
||||
- name: '✔️ Mark GitHub workspace as safe'
|
||||
if: ${{ inputs.os == 'Linux' }}
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
- name: '🛠️ Check compiler versions'
|
||||
if: ${{ inputs.os == 'Linux' }}
|
||||
run: |
|
||||
clang++ --version
|
||||
g++ --version
|
||||
|
||||
- name: '📥 Check out repository code'
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: '🗃️ Cache CPM dependencies'
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
key: ${{ inputs.os }}-CPM-cache
|
||||
path: '${{ env.BUILD_DIR }}/.cache'
|
||||
|
||||
- name: '⚙️ Generate build files'
|
||||
# Note: indenting arguments will lead to parsing errors
|
||||
run: >
|
||||
cmake
|
||||
-B "${{ env.BUILD_DIR }}"
|
||||
-DMODULE=${{ github.event.inputs.module }}
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DCMAKE_C_COMPILER=${{ env.C_COMPILER }}
|
||||
-DCMAKE_CXX_COMPILER=${{ env.CXX_COMPILER }}
|
||||
${{ env.WIN_FLAGS }}
|
||||
${{ env.LINUX_FLAGS }}
|
||||
--debug-output
|
||||
|
||||
- name: '🏗️ Build ${{ inputs.module }}'
|
||||
run: >
|
||||
cmake
|
||||
--build ${{ env.BUILD_DIR }}
|
||||
--config Release
|
||||
--target ${{ inputs.module }}
|
||||
|
||||
- name: '📤 Upload binaries'
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ inputs.module }}-${{ inputs.os }}-${{ inputs.bitness }}
|
||||
path: ${{ env.BUILD_DIR }}/${{ env.OUTPUT_PATH }}
|
||||
49
.github/workflows/kb-release.yml
vendored
49
.github/workflows/kb-release.yml
vendored
@@ -1,49 +0,0 @@
|
||||
name: Create release
|
||||
on:
|
||||
workflow_call:
|
||||
zip_command:
|
||||
description: 'A shell command for creating a release zip'
|
||||
required: true
|
||||
type: string
|
||||
jobs:
|
||||
package-project:
|
||||
name: Package the artifacts into a release zip
|
||||
if: startsWith(github.ref, 'refs/tags/')
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Setup version tag
|
||||
run: echo "VERSION_TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
|
||||
|
||||
- name: Setup zip name
|
||||
env:
|
||||
PROJECT_NAME: ${{ github.event.repository.name }}
|
||||
run: echo "ZIP_NAME=$PROJECT_NAME-$VERSION_TAG.zip" >> $GITHUB_ENV
|
||||
|
||||
- name: Install required tools
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install zip tree
|
||||
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Download all workflow run artifacts
|
||||
uses: actions/download-artifact@v5
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Print artifact tree
|
||||
run: tree artifacts
|
||||
|
||||
# - name: Make release zip
|
||||
# run: ${{ inputs.zip_command }}
|
||||
|
||||
# - name: 'Test upload'
|
||||
# uses: actions/upload-artifact@v4
|
||||
# with:
|
||||
# name: release
|
||||
# path: ${{ env.BUILD_DIR }}/${{ env.OUTPUT_PATH }}
|
||||
@@ -5,8 +5,6 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: ${{ matrix.module }}-${{ matrix.os }}-${{ matrix.bitness }}
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -14,7 +12,7 @@ jobs:
|
||||
os: [ Linux, Windows ]
|
||||
bitness: [ 32, 64 ]
|
||||
|
||||
uses: acidicoala/SmokeAPI/.github/workflows/kb-build.yml@master
|
||||
uses: acidicoala/KoalaBox/.github/workflows/build-cmake.yml@master
|
||||
with:
|
||||
module: ${{ matrix.module }}
|
||||
os: ${{ matrix.os }}
|
||||
5
.github/workflows/tag-release.yml
vendored
5
.github/workflows/tag-release.yml
vendored
@@ -8,11 +8,12 @@ on:
|
||||
jobs:
|
||||
build-binaries:
|
||||
name: '🏗️ Build Binaries'
|
||||
uses: acidicoala/SmokeAPI/.github/workflows/build.yml@master
|
||||
uses: acidicoala/SmokeAPI/.github/workflows/matrix-build.yml@master
|
||||
|
||||
create-release:
|
||||
name: '📦 Create Release'
|
||||
uses: acidicoala/SmokeAPI/.github/workflows/kb-release.yml@master
|
||||
uses: acidicoala/KoalaBox/.github/workflows/create-release.yml@master
|
||||
needs: build-binaries
|
||||
with:
|
||||
version: ${{ github.ref_name }}
|
||||
zip_command: 'TODO'
|
||||
2
KoalaBox
2
KoalaBox
Submodule KoalaBox updated: bceac19723...cd9b36b82c
Reference in New Issue
Block a user