From 5c5afc825516689328961f89af50caa17a96c280 Mon Sep 17 00:00:00 2001 From: Andrea Zoppi Date: Sat, 30 Mar 2024 23:43:51 +0100 Subject: [PATCH] Refactored GitHub Actions Signed-off-by: Andrea Zoppi --- .github/workflows/ci.yml | 131 ++++++++++++++++++++++++++ .github/workflows/compile.yml | 74 --------------- .github/workflows/test.yml | 40 -------- .github/workflows/test_all_scores.yml | 20 +++- 4 files changed, 150 insertions(+), 115 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/compile.yml delete mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..2e634f1 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,131 @@ +name: Compile + +on: + push: + branches: + - main + - github_actions + + pull_request: + +jobs: + + debug: + + strategy: + matrix: + + runner_image: + - ubuntu-latest + - macos-latest + - windows-latest + + compiler: + - gcc + #FIXME: - clang + + runs-on: ${{ matrix.runner_image }} + + env: + CC: ${{ matrix.compiler }} + + steps: + + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: setup-python + uses: actions/setup-python@v5 + + - name: build + uses: BSFishy/meson-build@v1.0.3 + with: + action: build + directory: builddir + setup-options: -Dbuildtype=debug + meson-version: 1.4.0 + ninja-version: 1.11.1 + + dbgopt: + + strategy: + matrix: + + runner_image: + - ubuntu-latest + - macos-latest + - windows-latest + + compiler: + - gcc + #FIXME: - clang + + runs-on: ${{ matrix.runner_image }} + + env: + CC: ${{ matrix.compiler }} + + steps: + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: setup-python + uses: actions/setup-python@v5 + + - name: build + uses: BSFishy/meson-build@v1.0.3 + with: + action: build + directory: builddir + setup-options: -Dbuildtype=debugoptimized + meson-version: 1.4.0 + ninja-version: 1.11.1 + + release: + + strategy: + matrix: + + runner_image: + - ubuntu-latest + - macos-latest + - windows-latest + + compiler: + - gcc + #FIXME: - clang + + runs-on: ${{ matrix.runner_image }} + + env: + CC: ${{ matrix.compiler }} + + steps: + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: setup-python + uses: actions/setup-python@v5 + + - name: build + uses: BSFishy/meson-build@v1.0.3 + with: + action: build + directory: builddir + setup-options: -Dbuildtype=release + meson-version: 1.4.0 + ninja-version: 1.11.1 + + - name: test + uses: BSFishy/meson-build@v1.0.3 + with: + action: test + directory: builddir + meson-version: 1.4.0 + ninja-version: 1.11.1 diff --git a/.github/workflows/compile.yml b/.github/workflows/compile.yml deleted file mode 100644 index e3def4a..0000000 --- a/.github/workflows/compile.yml +++ /dev/null @@ -1,74 +0,0 @@ -name: Compile - -on: - push: - branches: - - main - - pull_request: - branches: - - main - -jobs: - debug: - runs-on: ubuntu-latest - steps: - - - name: checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: setup-python - uses: actions/setup-python@v5 - - - name: build - uses: BSFishy/meson-build@v1.0.3 - with: - action: build - directory: builddir_debug - setup-options: -Dbuildtype=debug - meson-version: 1.4.0 - ninja-version: 1.11.1 - - debugoptimized: - runs-on: ubuntu-latest - steps: - - - name: checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: setup-python - uses: actions/setup-python@v5 - - - name: build - uses: BSFishy/meson-build@v1.0.3 - with: - action: build - directory: builddir_debugoptimized - setup-options: -Dbuildtype=debugoptimized - meson-version: 1.4.0 - ninja-version: 1.11.1 - - release: - runs-on: ubuntu-latest - steps: - - - name: checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: setup-python - uses: actions/setup-python@v5 - - - name: build - uses: BSFishy/meson-build@v1.0.3 - with: - action: build - directory: builddir_release - setup-options: -Dbuildtype=release - meson-version: 1.4.0 - ninja-version: 1.11.1 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index cd84eee..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,40 +0,0 @@ -name: Test - -on: - push: - branches: - - main - - pull_request: - branches: - - main - -jobs: - test: - runs-on: ubuntu-latest - steps: - - - name: checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: setup-python - uses: actions/setup-python@v5 - - - name: build - uses: BSFishy/meson-build@v1.0.3 - with: - action: build - directory: builddir_test - setup-options: -Dbuildtype=release - meson-version: 1.4.0 - ninja-version: 1.11.1 - - - name: test - uses: BSFishy/meson-build@v1.0.3 - with: - action: test - directory: builddir_test - meson-version: 1.4.0 - ninja-version: 1.11.1 diff --git a/.github/workflows/test_all_scores.yml b/.github/workflows/test_all_scores.yml index 1bd1de2..99c5da5 100644 --- a/.github/workflows/test_all_scores.yml +++ b/.github/workflows/test_all_scores.yml @@ -3,8 +3,26 @@ name: Test All Scores on: workflow_dispatch jobs: + test: - runs-on: ubuntu-latest + + strategy: + matrix: + + runner_image: + - ubuntu-latest + - macos-latest + - windows-latest + + compiler: + - gcc + #FIXME: - clang + + runs-on: ${{ matrix.runner_image }} + + env: + CC: ${{ matrix.compiler }} + steps: - name: checkout