From 440e740a99d221c63692b92abd283945d28fa34f Mon Sep 17 00:00:00 2001 From: Pierre-Emmanuel Patry Date: Sat, 4 May 2024 18:15:12 +0200 Subject: [PATCH] Add a new CI for windows environments ChangeLog: * .github/workflows/ccpp.yml: Signed-off-by: Pierre-Emmanuel Patry --- .github/workflows/ccpp.yml | 46 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index b36497452a34..70e66a6c0fbe 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -304,3 +304,49 @@ 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@v4 + + - name: '${{ matrix.sys }} Install deps' + uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + update: true + install: >- + git + dejagnu + base-devel + pacboy: >- + toolchain:p + rust:p + + - run: | + find . -name .cargo-checksum.json -exec sed -i.uncheck -e 's/"files":{[^}]*}/"files":{ }/' '{}' '+' + + + - name: Configure + run: | + mkdir -p gccrs-build; + cd gccrs-build; + ../configure \ + --enable-languages=rust \ + --disable-bootstrap + - name: Build + run: | + make -C gccrs-build -j1 # $(nproc) + + - name: Run Tests + run: | + cd gccrs-build; \ + make check-rust