Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 22 additions & 33 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
tags:
- 'v*'
workflow_dispatch:

permissions:
contents: write
Expand Down Expand Up @@ -66,51 +67,38 @@ jobs:
path: dist/engine-control-test-rig-simulator-linux-x64.tar.gz

build-win64:
runs-on: windows-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install MSYS2 toolchain
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
install: >-
mingw-w64-x86_64-gcc
mingw-w64-x86_64-make
mingw-w64-x86_64-python
mingw-w64-x86_64-raylib
- name: Install Win64 cross-build dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
gcc \
make \
python3 \
cmake \
git \
g++-mingw-w64-x86-64 \
gcc-mingw-w64-x86-64 \
binutils-mingw-w64-x86-64 \
wine64

- name: Build Win64 release bundle
shell: msys2 {0}
run: |
make all visualizer CC=gcc PYTHON=python
make generate-visualization-json CC=gcc PYTHON=python

rm -rf dist/win64-runtime
mkdir -p dist/win64-runtime
python tools/collect_mingw_runtime_dlls.py \
--output-dir ./dist/win64-runtime \
--binary ./build/testrig.exe \
--binary ./build/visualizer.exe \
--search-dir /mingw64/bin \
--objdump objdump

python tools/package_release.py \
--platform win64 \
--testrig ./build/testrig.exe \
--visualizer ./build/visualizer.exe \
--archive ./dist/engine-control-test-rig-simulator-win64.zip \
--extra-tree ./dist/win64-runtime:.
make package-release-win64-local \
PYTHON=python3 \
RELEASE_PLATFORM=win64 \
RELEASE_ARCHIVE=./dist/engine-control-test-rig-simulator-win64.zip

- name: Audit Win64 release bundle
shell: msys2 {0}
run: |
rm -rf ./dist/test-win64
mkdir -p ./dist/test-win64
python -c 'import zipfile; zipfile.ZipFile("./dist/engine-control-test-rig-simulator-win64.zip").extractall("./dist/test-win64")'
python3 -c 'import zipfile; zipfile.ZipFile("./dist/engine-control-test-rig-simulator-win64.zip").extractall("./dist/test-win64")'
cd ./dist/test-win64/engine-control-test-rig-simulator-win64
python tools/release_audit.py --bundle-dir . --skip-visualizer
python3 tools/release_audit.py --bundle-dir . --command-prefix wine --visualizer-timeout 5 --skip-visualization-regeneration

- name: Upload Win64 bundle artifact
uses: actions/upload-artifact@v4
Expand All @@ -119,6 +107,7 @@ jobs:
path: dist/engine-control-test-rig-simulator-win64.zip

publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
needs:
- build-linux-x64
- build-win64
Expand Down
Loading