Skip to content

Commit

Permalink
CI/CD matrix for GNU and Clang Compiler versions within github action…
Browse files Browse the repository at this point in the history
…s - second version
  • Loading branch information
Josee1031 committed Jul 31, 2024
1 parent 819e91b commit f7f5167
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ on:
push:
branches: ["CI-CD"]
pull_request:
branches: [ "main" ]
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -18,19 +18,20 @@ jobs:
- { name: 'gnu', version: '10' }
- { name: 'gnu', version: '11' }
- { name: 'gnu', version: '12' }

steps:
- uses: actions/checkout@v4

- name: Set up compiler
run: |
sudo apt-get update
if [ "${{ matrix.compiler.name }}" == "gnu" ]; then
sudo apt-get install -y g++-${{ matrix.compiler.version }}
export CXX=g++-${{ matrix.compiler.version }}
elif [ "${{ matrix.compiler.name }}" == "clang" ]; then
sudo apt-get install -y clang-${{ matrix.compiler.version }}
export CXX=clang++-${{ matrix.compiler.version }}
fi
- name: make check
run: make check
env:
CXX: ${{ matrix.compiler.name }}-${{ matrix.compiler.version }}

0 comments on commit f7f5167

Please sign in to comment.