Update release-crosscompile.yml #27
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Cross Compile to Windows | ||
| on: | ||
| workflow_dispatch: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| branches: | ||
| - main | ||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Repository | ||
| uses: actions/checkout@v3 | ||
| with: | ||
| ref: mob | ||
| - name: Set up MinGW cross-compilation toolchain | ||
| run: | | ||
| echo "Setting up cross-compilers for Windows..." | ||
| sudo apt update | ||
| sudo apt install -y mingw-w64 gcc-mingw-w64-x86-64 | ||
| - name: Build the project for Windows | ||
| run: | | ||
| echo "Starting build process for Windows target..." | ||
| mkdir -p build | ||
| cd build | ||
| echo "Running make with MinGW cross-compiler..." | ||
| CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ ../Makefile | ||
| - name: Debugging: List files in build directory | ||
| run: | | ||
| echo "Listing files in the build directory..." | ||
| ls -al build | ||
| - name: Debugging: Check environment variables | ||
| run: | | ||
| echo "Checking environment variables..." | ||
| env | ||
| - name: Debugging: Check MinGW installation | ||
| run: | | ||
| echo "Verifying MinGW installation..." | ||
| mingw-w64-gcc --version | ||
| - name: Debugging: Verify Makefile existence | ||
| run: | | ||
| echo "Checking if Makefile exists..." | ||
| ls -al ../ | ||
| - name: List installed packages | ||
| run: | | ||
| echo "Listing installed packages..." | ||
| dpkg -l | ||
| - name: Upload Windows build artifact | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: windows-build | ||
| path: build/ | ||
| - name: Clean up | ||
| run: | | ||
| echo "Cleaning up after build process..." | ||
| rm -rf build | ||