diff --git a/.github/workflows/tests-gcc.yml b/.github/workflows/tests-gcc-linux.yml similarity index 93% rename from .github/workflows/tests-gcc.yml rename to .github/workflows/tests-gcc-linux.yml index 64d78d47..1adc4801 100644 --- a/.github/workflows/tests-gcc.yml +++ b/.github/workflows/tests-gcc-linux.yml @@ -8,7 +8,7 @@ on: jobs: tests: - name: Run the tests - GCC + name: Run the tests - GCC Linux runs-on: ubuntu-latest strategy: fail-fast: false diff --git a/.github/workflows/tests-gcc-windows.yml b/.github/workflows/tests-gcc-windows.yml new file mode 100644 index 00000000..45d6028b --- /dev/null +++ b/.github/workflows/tests-gcc-windows.yml @@ -0,0 +1,69 @@ +name: GCC Tests For Windows MINGW based builds + +on: + push: + branches: 'main' + pull_request: + branches: '*' + +jobs: + tests: + name: Run the tests - GCC MinGW Windows + runs-on: windows-latest + strategy: + fail-fast: false + matrix: + include: + # - { icon: '⬛', sys: mingw32 } + - { icon: '🟦', sys: mingw64 } + # - { icon: '🟨', sys: ucrt64 } + # - { icon: '🟧', sys: clang64 } + name: ${{ matrix.icon }} ${{ matrix.sys }} + defaults: + run: + shell: msys2 {0} + steps: + + - name: '🧰 Checkout' + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: '${{ matrix.icon }} Setup MSYS2' + uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + cache: true + update: true + install: >- + git + pacboy: >- + toolchain:p + cmake:p + ninja:p + + - name: Cache 3rd party dependencies + id: cache-3rd-party-deps-restore + uses: actions/cache/restore@v3 + with: + path: | + install + key: ${{ runner.os }}-cache-3rd-party-deps + + + - name: Caching project dependencies + id: project-cache + uses: Swatinem/rust-cache@v2 + + - name: Running the tests for the project + run: | + cd zork++ + RUST_LOG=trace cargo test 2>&1 gcc_windows --color=always --no-fail-fast -- --nocapture --show-output --test-threads=1 + + - name: Cache 3rd party dependencies + id: cache-save-3rd-party-deps + uses: actions/cache/save@v3 + with: + path: | + install + key: ${{ steps.cache-3rd-party-deps-restore.outputs.cache-primary-key }} diff --git a/zork++/test/test.rs b/zork++/test/test.rs index c45b883a..ab36b4a0 100644 --- a/zork++/test/test.rs +++ b/zork++/test/test.rs @@ -114,7 +114,6 @@ fn test_msvc_full_process() -> Result<()> { #[cfg(target_os = "windows")] #[test] -#[ignore] // TODO: we need to add the `MSYS2` project on the Windows GitHub VM's fn test_gcc_windows_full_process() -> Result<()> { let project_name = "gcc_example";