diff --git a/.github/workflows/test-ubuntu-18.04.yml b/.github/workflows/test-ubuntu-18.04.yml new file mode 100644 index 0000000..38f280b --- /dev/null +++ b/.github/workflows/test-ubuntu-18.04.yml @@ -0,0 +1,20 @@ +name: ubuntu-18.04 + +on: + push: + branches: + - main + pull_request: + branches: + - main + +defaults: + run: + shell: bash + +jobs: + tests: + name: ubuntu-18.04 + uses: ./.github/workflows/tests.yml + with: + runner-os: "ubuntu-18.04" diff --git a/.github/workflows/test-ubuntu-20.04.yml b/.github/workflows/test-ubuntu-20.04.yml new file mode 100644 index 0000000..ad43f3f --- /dev/null +++ b/.github/workflows/test-ubuntu-20.04.yml @@ -0,0 +1,20 @@ +name: ubuntu-20.04 + +on: + push: + branches: + - main + pull_request: + branches: + - main + +defaults: + run: + shell: bash + +jobs: + tests: + name: ubuntu-20.04 + uses: ./.github/workflows/tests.yml + with: + runner-os: "ubuntu-20.04" diff --git a/.github/workflows/test-ubuntu-22.04.yml b/.github/workflows/test-ubuntu-22.04.yml new file mode 100644 index 0000000..c3e6e26 --- /dev/null +++ b/.github/workflows/test-ubuntu-22.04.yml @@ -0,0 +1,20 @@ +name: ubuntu-22.04 + +on: + push: + branches: + - main + pull_request: + branches: + - main + +defaults: + run: + shell: bash + +jobs: + tests: + name: ubuntu-22.04 + uses: ./.github/workflows/tests.yml + with: + runner-os: "ubuntu-22.04" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 612f755..c9604c3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,12 +1,11 @@ name: Tests on: - push: - branches: - - main - pull_request: - branches: - - main + workflow_call: + inputs: + runner-os: + required: true + type: string defaults: run: @@ -14,12 +13,12 @@ defaults: jobs: test: - name: clang-format-${{ matrix.version }} - runs-on: ubuntu-latest + name: clang-format-${{ matrix.clang-format-version }} + runs-on: ${{ inputs.runner-os }} strategy: fail-fast: false matrix: - version: + clang-format-version: - 3 - 4 - 5 @@ -35,4 +34,4 @@ jobs: steps: - uses: actions/checkout@v3 - name: Build and test the Docker image - run: test/test.sh ${{ matrix.version }} + run: test/test.sh ${{ matrix.clang-format-version }}