2 Commits
Author SHA1 Message Date
ShiftyX1 3da03fdd7f fix: upgrade actions/upload-artifact from v3 to v4 across workflow files
Build and Release / prepare (push) Successful in 1s
Build and Release / build_windows (push) Has been cancelled
Build and Release / publish_release (push) Has been cancelled
Build and Release / build_linux (push) Has been cancelled
2025-12-09 00:40:18 +03:00
ShiftyX1 21874e98c2 fix: update Windows build workflow for cross-compilation and improve CMake configuration
Build / Build (push) Has been cancelled
MSVC Build / build-windows (windows-latest) (push) Has been cancelled
2025-12-09 00:33:55 +03:00
6 changed files with 48 additions and 49 deletions
+1 -1
View File
@@ -64,7 +64,7 @@ jobs:
UPDATE_INFO: gh-releases-zsync|MihailRis|VoxelEngine-Cpp|latest|*x86_64.AppImage.zsync UPDATE_INFO: gh-releases-zsync|MihailRis|VoxelEngine-Cpp|latest|*x86_64.AppImage.zsync
with: with:
recipe: dev/AppImageBuilder.yml recipe: dev/AppImageBuilder.yml
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: AppImage name: AppImage
path: './*.AppImage*' path: './*.AppImage*'
+1 -1
View File
@@ -73,7 +73,7 @@ jobs:
run: ctest --test-dir ${{github.workspace}}/build run: ctest --test-dir ${{github.workspace}}/build
- name: Upload artifacts - name: Upload artifacts
if: ${{ inputs.upload_artifacts }} if: ${{ inputs.upload_artifacts }}
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: VoxelEngine name: VoxelEngine
path: | path: |
+1 -1
View File
@@ -62,7 +62,7 @@ jobs:
hdiutil create VoxelEngineMacApp.dmg -volname "VoxelEngine" -srcfolder VoxelEngineDmgContent -ov -format UDZO hdiutil create VoxelEngineMacApp.dmg -volname "VoxelEngine" -srcfolder VoxelEngineDmgContent -ov -format UDZO
- name: Upload artifacts - name: Upload artifacts
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v4
with: with:
name: VoxelEngineMacOs name: VoxelEngineMacOs
path: VoxelEngineMacApp.dmg path: VoxelEngineMacApp.dmg
+1 -1
View File
@@ -39,7 +39,7 @@ jobs:
with: with:
ref: ${{ env.BRANCH_NAME }} ref: ${{ env.BRANCH_NAME }}
- name: Download Build Artifact - name: Download Build Artifact
uses: actions/download-artifact@v3 uses: actions/download-artifact@v4
with: with:
path: ./artifacts path: ./artifacts
- name: Show Artifacts - name: Show Artifacts
+35 -36
View File
@@ -1,4 +1,4 @@
name: Windows Build (CLang) name: Windows Build (Cross-compile)
on: on:
push: push:
@@ -14,62 +14,61 @@ on:
jobs: jobs:
build-windows: build-windows:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- os: windows-latest
compiler: clang
runs-on: ${{ matrix.os }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v4
with: with:
submodules: 'true' submodules: 'true'
- uses: msys2/setup-msys2@v2
id: msys2 - name: Install cross-compilation tools
name: Setup MSYS2 run: |
with: sudo apt-get update
msystem: clang64 sudo apt-get install -y mingw-w64 cmake wget git zip
install: >-
mingw-w64-clang-x86_64-toolchain - name: Install CMake >= 3.26
mingw-w64-clang-x86_64-cmake run: |
git wget https://github.com/Kitware/CMake/releases/download/v3.27.9/cmake-3.27.9-linux-x86_64.sh
chmod +x cmake-3.27.9-linux-x86_64.sh
sudo ./cmake-3.27.9-linux-x86_64.sh --skip-license --prefix=/usr/local
rm cmake-3.27.9-linux-x86_64.sh
- name: Set up vcpkg - name: Set up vcpkg
shell: msys2 {0}
run: | run: |
git clone https://github.com/microsoft/vcpkg.git git clone https://github.com/microsoft/vcpkg.git
cd vcpkg cd vcpkg
./bootstrap-vcpkg.bat ./bootstrap-vcpkg.sh
./vcpkg integrate install
cd .. cd ..
- name: Configure project with CMake and vcpkg
- name: Configure and build project
env: env:
VCPKG_DEFAULT_TRIPLET: x64-mingw-static VCPKG_DEFAULT_TRIPLET: x64-mingw-static
VCPKG_DEFAULT_HOST_TRIPLET: x64-mingw-static VCPKG_DEFAULT_HOST_TRIPLET: x64-linux
shell: msys2 {0}
run: | run: |
export VCPKG_ROOT=$(pwd)/vcpkg export VCPKG_ROOT=$(pwd)/vcpkg
mkdir build mkdir build
cd build cd build
cmake -G "MinGW Makefiles" -DVCPKG_TARGET_TRIPLET=x64-mingw-static -DVC_BUILD_NAME="${{ inputs.build_name }}" -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake .. cmake -DCMAKE_TOOLCHAIN_FILE=$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake \
-DVCPKG_TARGET_TRIPLET=x64-mingw-static \
-DCMAKE_SYSTEM_NAME=Windows \
-DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
-DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
-DCMAKE_RC_COMPILER=x86_64-w64-mingw32-windres \
-DCMAKE_BUILD_TYPE=Release \
-DVC_BUILD_NAME="${{ inputs.build_name }}" \
..
cmake --build . --config Release cmake --build . --config Release
- name: Package for Windows - name: Package for Windows
run: | run: |
mkdir packaged mkdir packaged
mkdir packaged/res mkdir packaged/res
cp build/VoxelEngine.exe packaged/ cp build/VoxelEngine.exe packaged/VoxelCore.exe || cp build/VoxelEngine packaged/VoxelCore.exe
cp build/vctest/vctest.exe packaged/ cp build/vctest/vctest.exe packaged/ || cp build/vctest/vctest packaged/vctest.exe
cp build/*.dll packaged/ cp build/*.dll packaged/ 2>/dev/null || true
cp -r build/res/* packaged/res/ cp -r build/res/* packaged/res/
mv packaged/VoxelEngine.exe packaged/VoxelCore.exe
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: Windows-Build name: Windows-Build
path: 'packaged/*' path: 'packaged/*'
- name: Run engine tests
shell: msys2 {0}
working-directory: ${{ github.workspace }}
run: |
packaged/vctest.exe -e packaged/VoxelCore.exe -d dev/tests -u build
+1 -1
View File
@@ -47,7 +47,7 @@ jobs:
cp C:/Windows/System32/msvcp140.dll packaged/msvcp140.dll cp C:/Windows/System32/msvcp140.dll packaged/msvcp140.dll
mv packaged/VoxelEngine.exe packaged/VoxelCore.exe mv packaged/VoxelEngine.exe packaged/VoxelCore.exe
working-directory: ${{ github.workspace }} working-directory: ${{ github.workspace }}
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v4
with: with:
name: Windows-Build name: Windows-Build
path: 'packaged/*' path: 'packaged/*'