|
62 | 62 | shell: cmd
|
63 | 63 | run:
|
64 | 64 | build\\RelWithDebInfo\\uv_run_tests_a.exe
|
| 65 | + |
| 66 | + build-mingw: |
| 67 | + runs-on: ubuntu-latest |
| 68 | + name: build-mingw-${{ matrix.config.arch }} |
| 69 | + strategy: |
| 70 | + fail-fast: false |
| 71 | + matrix: |
| 72 | + config: |
| 73 | + - {arch: i686, server: 2022, libgcc: dw2 } |
| 74 | + - {arch: x86_64, server: 2022, libgcc: seh } |
| 75 | + steps: |
| 76 | + - uses: actions/checkout@v3 |
| 77 | + - name: Install mingw32 environment |
| 78 | + run: | |
| 79 | + sudo apt update |
| 80 | + sudo apt install mingw-w64 ninja-build -y |
| 81 | + - name: Build |
| 82 | + run: | |
| 83 | + cmake -S . -B build -G Ninja -DHOST_ARCH=${{ matrix.config.arch }} -DBUILD_TESTING=ON -DCMAKE_TOOLCHAIN_FILE=cmake-toolchains/cross-mingw32.cmake |
| 84 | + cmake --build build |
| 85 | + cmake --install build --prefix "`pwd`/build/usr" |
| 86 | + mkdir -p build/usr/test build/usr/bin |
| 87 | + cp -av test/fixtures build/usr/test |
| 88 | + cp -av build/uv_run_tests_a.exe build/uv_run_tests.exe \ |
| 89 | + `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libgcc_s_${{ matrix.config.libgcc }}-1.dll` \ |
| 90 | + `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libwinpthread-1.dll` \ |
| 91 | + `${{ matrix.config.arch }}-w64-mingw32-gcc -print-file-name=libatomic-1.dll` \ |
| 92 | + build/usr/bin |
| 93 | + - name: Upload build artifacts |
| 94 | + uses: actions/upload-artifact@v3 |
| 95 | + with: |
| 96 | + name: mingw-${{ matrix.config.arch }} |
| 97 | + path: build/usr/**/* |
| 98 | + retention-days: 2 |
| 99 | + |
| 100 | + test-mingw: |
| 101 | + runs-on: windows-${{ matrix.config.server }} |
| 102 | + name: test-mingw-${{ matrix.config.arch }} |
| 103 | + needs: build-mingw |
| 104 | + strategy: |
| 105 | + fail-fast: false |
| 106 | + matrix: |
| 107 | + config: |
| 108 | + - {arch: i686, server: 2022} |
| 109 | + - {arch: x86_64, server: 2022} |
| 110 | + steps: |
| 111 | + - name: Download build artifacts |
| 112 | + uses: actions/download-artifact@v2 |
| 113 | + with: |
| 114 | + name: mingw-${{ matrix.config.arch }} |
| 115 | + - name: Test |
| 116 | + shell: cmd |
| 117 | + run: | |
| 118 | + bin\uv_run_tests_a.exe |
| 119 | + - name: Test |
| 120 | + shell: cmd |
| 121 | + run: | |
| 122 | + bin\uv_run_tests.exe |
0 commit comments