Skip to content

Build Release Artifacts #6

Build Release Artifacts

Build Release Artifacts #6

Workflow file for this run

name: Build Release Artifacts
on:
push:
tags:
- "v*"
workflow_dispatch:
env:
CONFIG: Release
BUILD_SERVER: "1"
jobs:
linux-docker:
name: Build Linux .so (32-bit)
runs-on: ubuntu-latest
steps:
- name: Checkout repository (with submodules)
uses: actions/checkout@v4
with:
submodules: recursive
- name: Prepare build folder (uid 1000 required by container)
run: |
mkdir -p docker/build
sudo chown 1000:1000 docker/build
- name: Build Docker image
run: |
docker build -t Randomix/build:ubuntu-18.04 docker/build_ubuntu-18.04/
- name: Run build in Docker container
env:
CONFIG: ${{ env.CONFIG }}
BUILD_SERVER: ${{ env.BUILD_SERVER }}
run: |
docker run --rm -t \
-w /code \
-v "${{ github.workspace }}:/code" \
-v "${{ github.workspace }}/docker/build:/code/build" \
-e CONFIG=${CONFIG} \
-e BUILD_SERVER=${BUILD_SERVER} \
Randomix/build:ubuntu-18.04
- name: Upload Linux .so artifacts
uses: actions/upload-artifact@v4
with:
name: linux-so
path: |
docker/build/**/*.so
docker/build/*.so
windows-simple:
name: Build Windows .dll (32-bit)
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
- name: Configure CMake for 32-bit
run: |
cmake -S . -B build -G "Visual Studio 17 2022" -A Win32 -DCMAKE_BUILD_TYPE=Release
shell: powershell
- name: Build
run: |
cmake --build build --config Release --parallel
shell: powershell
- name: Organize artifacts
run: |
# Create artifacts folder
New-Item -ItemType Directory -Path "artifacts" -Force | Out-Null
# Copy all DLLs to artifacts folder
Get-ChildItem -Path "build" -Filter "*.dll" -Recurse | ForEach-Object {
Copy-Item $_.FullName -Destination "artifacts\" -Force
Write-Host "Copied: $($_.Name)"
}
# List all artifacts
Write-Host "`n=== Final artifacts ==="
Get-ChildItem -Path "artifacts" | Format-Table Name, Length
shell: powershell
- name: Upload Windows DLL artifacts
uses: actions/upload-artifact@v4
with:
name: windows-dll-32bit
path: artifacts/*.dll
if-no-files-found: error