|
| 1 | +--- |
| 2 | +name: ubuntu2404-x86_64-w64-mingw32 |
| 3 | + |
| 4 | +on: |
| 5 | + push: |
| 6 | + branches: [ "main" ] |
| 7 | + pull_request: |
| 8 | + branches: [ "main" ] |
| 9 | + |
| 10 | +env: |
| 11 | + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
| 12 | + BUILD_TYPE: Release |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + runs-on: ubuntu-24.04 |
| 17 | + |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + with: |
| 21 | + submodules: recursive |
| 22 | + |
| 23 | + - name: Install Tools |
| 24 | + run: | |
| 25 | + sudo apt-get -qq update |
| 26 | + sudo apt-get -qq install wine mingw-w64-tools g++-mingw-w64-x86-64 mingw-w64-x86-64-dev gcc-mingw-w64-x86-64 make automake autoconf libltdl-dev perl curl |
| 27 | + sudo update-alternatives --set x86_64-w64-mingw32-gcc /usr/bin/x86_64-w64-mingw32-gcc-posix |
| 28 | + sudo update-alternatives --set x86_64-w64-mingw32-g++ /usr/bin/x86_64-w64-mingw32-g++-posix |
| 29 | +
|
| 30 | + - name: Setup Wine |
| 31 | + run: | |
| 32 | + sudo apt-get -qq install wine-binfmt binfmt-support # wine needs to installed already |
| 33 | + sudo update-binfmts --disable cli # disable mono attempts to execute windows binaries |
| 34 | + sudo update-binfmts --import /usr/share/binfmts/wine # enable wine to execute windows binaries |
| 35 | + echo "WINARCH=win64" >> $GITHUB_ENV |
| 36 | + echo "WINEDEBUG=fixme-all,-all" >> $GITHUB_ENV |
| 37 | + GCC_S_FILE=$(x86_64-w64-mingw32-g++ --print-file-name libgcc_s.a) |
| 38 | + GCC_S_FILE=$(realpath "$GCC_S_FILE") |
| 39 | + GCC_RUNTIME_PATH=$(dirname "$GCC_S_FILE") |
| 40 | + GCC_RUNTIME_WINEPATH=$(winepath --windows "$GCC_RUNTIME_PATH") |
| 41 | + WINPTHREAD_FILE=$(x86_64-w64-mingw32-g++ --print-file-name libwinpthread-1.dll) |
| 42 | + WINPTHREAD_FILE=$(realpath "$WINPTHREAD_FILE") |
| 43 | + MINGW_RUNTIME_PATH=$(dirname "$WINPTHREAD_FILE") |
| 44 | + MINGW_RUNTIME_WINEPATH=$(winepath --windows "$MINGW_RUNTIME_PATH") |
| 45 | + echo "WINEPATH=${GCC_RUNTIME_WINEPATH};${MINGW_RUNTIME_WINEPATH}" >> $GITHUB_ENV |
| 46 | +
|
| 47 | + - name: Compile |
| 48 | + run: ./compile.bash x86_64-w64-mingw32 |
0 commit comments