Repository navigation
Run the testsuite on Windows (MSVC): portable tools, executor, CI, RE… #281
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: moocore | |
| on: | |
| push: | |
| branches-ignore: [gh-pages] | |
| paths-ignore: | |
| - '*.md' | |
| pull_request: | |
| branches-ignore: [gh-pages] | |
| paths-ignore: | |
| - '*.md' | |
| # Manual run | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read # access to check out code and install dependencies | |
| jobs: | |
| test: | |
| if: "! contains(github.event.head_commit.message, '[skip ci]')" | |
| name: Run testsuite on ${{ matrix.os }} with ${{ matrix.cc }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-24.04 ] | |
| cc: [ gcc-12, gcc-13, gcc-14, clang-18 ] | |
| include: | |
| - { os: ubuntu-22.04, cc: gcc-10 } | |
| - { os: ubuntu-22.04, cc: gcc-11 } | |
| - { os: ubuntu-24.04-arm, cc: gcc-12 } | |
| - { os: macos-15, cc: clang } | |
| - { os: macos-15, cc: gcc-13 } | |
| - { os: macos-15-intel, cc: clang } | |
| - { os: macos-15-intel, cc: gcc-13 } | |
| env: | |
| CC: ${{ matrix.cc }} | |
| steps: | |
| - name: Checkout moocore | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: multi-objective/moocore | |
| sparse-checkout: c | |
| - name: Checkout testsuite | |
| uses: actions/checkout@v6 | |
| with: | |
| path: testsuite | |
| - run: ${{ matrix.cc }} -v | |
| shell: bash | |
| - name: Install dependencies | |
| run: | | |
| python3 -m venv env | |
| source env/bin/activate | |
| python3 -m pip install --upgrade pip | |
| python3 -m pip install -r testsuite/requirements.txt | |
| - name: make time (DEBUG=0, -O3 -flto) | |
| run: | | |
| source env/bin/activate | |
| make -C c time | |
| - name: make test (DEBUG=1, -O3 -flto) | |
| run: | | |
| source env/bin/activate | |
| make -C c test OPT_CFLAGS="-O3 -flto" | |
| - name: make asan (DEBUG=0, -O3 -flto -g3) | |
| if: ${{ matrix.os == 'ubuntu-24.04' && ( matrix.cc == 'gcc-14' || matrix.cc == 'clang-18') }} | |
| run: | | |
| source env/bin/activate | |
| make -C c asan OPT_CFLAGS="-O3 -flto -g3" | |
| - name: make ubsan (DEBUG=0, -O2 -flto -g3) | |
| if: ${{ matrix.os == 'ubuntu-24.04' && ( matrix.cc == 'gcc-14' || matrix.cc == 'clang-18') }} | |
| run: | | |
| source env/bin/activate | |
| make -C c ubsan OPT_CFLAGS="-O2 -flto -g3" | |
| - name: Collect failed test outputs | |
| if: failure() | |
| run: | | |
| mkdir -p failed-test-outputs | |
| TEMPDIR=$(python3 -c 'import tempfile; print(tempfile.gettempdir())') | |
| find "$TEMPDIR" \( -name "*_*.out" -o -name "*_*.out.xz" \) -type f -exec sh -c 'cp "$1" "failed-test-outputs/$(basename "$1")"' _ {} \; || true | |
| ls -la failed-test-outputs/ || true | |
| - name: Upload failed test outputs | |
| if: failure() | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: failed-tests-${{ matrix.os }}-${{ matrix.cc }}-${{ github.run_id }} | |
| path: failed-test-outputs/ | |
| if-no-files-found: ignore | |
| test-windows: | |
| if: "! contains(github.event.head_commit.message, '[skip ci]')" | |
| name: Run testsuite on windows-latest with MSVC | |
| runs-on: windows-latest | |
| env: | |
| PYTHONUTF8: 1 | |
| steps: | |
| - name: Checkout moocore | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: multi-objective/moocore | |
| sparse-checkout: c | |
| - name: Checkout testsuite | |
| uses: actions/checkout@v6 | |
| with: | |
| path: testsuite | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: python -m pip install -r testsuite/requirements.txt | |
| - name: Build moocore (MSVC) | |
| shell: bash | |
| run: make -C c all CC=cl DEBUG=1 | |
| - name: Run testsuite | |
| shell: bash | |
| run: | | |
| for t in dominatedsets eaf epsilon hv hvapprox igd ndsort nondominated; do | |
| (cd testsuite/$t && python ../regtest.py "$GITHUB_WORKSPACE/bin/$t") || exit 1 | |
| done |