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