From 94353a539cfef6a1fd92f51bec9667a05c0d0318 Mon Sep 17 00:00:00 2001 From: Chip Hogg Date: Wed, 26 Jul 2023 15:18:45 -0400 Subject: [PATCH] Make separate workflow for each build config This will enable us to give each config its own badge. We can display these badges prominently on our README file. We can also add them to the new page we'll add which clarifies which configurations we support. --- .github/workflows/build-and-test.yml | 16 +++++++--------- .github/workflows/clang11-ubuntu.yml | 27 +++++++++++++++++++++++++++ .github/workflows/clang14-ubuntu.yml | 27 +++++++++++++++++++++++++++ .github/workflows/gcc10-ubuntu.yml | 27 +++++++++++++++++++++++++++ 4 files changed, 88 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/clang11-ubuntu.yml create mode 100644 .github/workflows/clang14-ubuntu.yml create mode 100644 .github/workflows/gcc10-ubuntu.yml diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b9bd6246..a11bbb8d 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -15,19 +15,17 @@ name: build-and-test on: - push: - branches: - - main - pull_request: + workflow_call: + inputs: + config: + required: true + type: string jobs: build: runs-on: ubuntu-latest - strategy: - matrix: - config: ["clang11", "clang14", "gcc10"] steps: - uses: actions/checkout@dc323e67f16fb5f7663d20ff7941f27f5809e9b6 #v2.6.0 - - name: Build and test (${{ matrix.config }}) - run: bazel test --copt=-Werror --config=${{ matrix.config }} //...:all + - name: Build and test (${{ inputs.config }}) + run: bazel test --copt=-Werror --config=${{ inputs.config }} //...:all diff --git a/.github/workflows/clang11-ubuntu.yml b/.github/workflows/clang11-ubuntu.yml new file mode 100644 index 00000000..48c94bec --- /dev/null +++ b/.github/workflows/clang11-ubuntu.yml @@ -0,0 +1,27 @@ +# Copyright 2023 Aurora Operations, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: clang11-ubuntu + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + uses: ./.github/workflows/build-and-test.yml + with: + config: clang11 diff --git a/.github/workflows/clang14-ubuntu.yml b/.github/workflows/clang14-ubuntu.yml new file mode 100644 index 00000000..9cda36e8 --- /dev/null +++ b/.github/workflows/clang14-ubuntu.yml @@ -0,0 +1,27 @@ +# Copyright 2023 Aurora Operations, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: clang14-ubuntu + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + uses: ./.github/workflows/build-and-test.yml + with: + config: clang14 diff --git a/.github/workflows/gcc10-ubuntu.yml b/.github/workflows/gcc10-ubuntu.yml new file mode 100644 index 00000000..108d8eb6 --- /dev/null +++ b/.github/workflows/gcc10-ubuntu.yml @@ -0,0 +1,27 @@ +# Copyright 2023 Aurora Operations, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: gcc10-ubuntu + +on: + push: + branches: + - main + pull_request: + +jobs: + build: + uses: ./.github/workflows/build-and-test.yml + with: + config: gcc10