diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 3381ec80d689..0cae86f1eac4 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -301,3 +301,58 @@ jobs: else \ exit 0; \ fi + build-and-check-windows: + runs-on: windows-latest + strategy: + matrix: + include: + - { sys: mingw64, env: x86_64 } + - { sys: mingw32, env: i686 } + name: 'Windows ${{ matrix.env }} ${{ matrix.sys }}' + defaults: + run: + shell: msys2 {0} + steps: + - uses: actions/checkout@v3 + + - name: '${{ matrix.sys }} Install deps' + uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + update: true + install: >- + git + make + dejagnu + mpc + mpfr + gmp + curl + pacboy: >- + toolchain:p + rust:p + + - name: Install cargo + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain=1.72.0; + curl -sSf https://github.com/chocolatey/choco/blob/b6495f72d1f2b9901747d857467c4ed3f7306391/src/chocolatey.resources/redirects/RefreshEnv.cmd | cmd + + - name: Make Source Read-Only + run: chmod -R a-w * + + - name: Configure + run: | + mkdir -p gccrs-build; + cd gccrs-build; + ../configure \ + --enable-languages=rust \ + --disable-bootstrap \ + --enable-multilib + - name: Build + run: | + make -C gccrs-build -j $(nproc) + + - name: Run Tests + run: | + cd gccrs-build; \ + make check-rust