Skip to content

Commit 7d941de

Browse files
committed
ci: split GHA workflow file into GCC and Clang file
1 parent c9f6637 commit 7d941de

File tree

3 files changed

+36
-31
lines changed

3 files changed

+36
-31
lines changed
Lines changed: 1 addition & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,8 @@
1-
name: GitHub CI
1+
name: Clang
22

33
on: push
44

55
jobs:
6-
gcc:
7-
runs-on: ubuntu-22.04
8-
strategy:
9-
fail-fast: false
10-
matrix:
11-
version: [9, 10, 11]
12-
steps:
13-
# Checks-out the repository under $GITHUB_WORKSPACE.
14-
- uses: actions/checkout@v3
15-
with:
16-
submodules: 'recursive'
17-
- name: Install Debian packages
18-
run: |
19-
sudo apt-get update
20-
sudo apt-get install -y cmake g++-${{ matrix.version }} pkg-config
21-
- name: Build with GNU GCC ${{ matrix.version }}
22-
run: |
23-
export CXX=g++-${{ matrix.version }}
24-
export CC=gcc-${{ matrix.version }}
25-
cd $GITHUB_WORKSPACE
26-
mkdir build
27-
cd build
28-
cmake ../
29-
make -j4
30-
- name: Run tests
31-
run: |
32-
cd "$GITHUB_WORKSPACE/build"
33-
ctest -V
34-
356
clang:
367
runs-on: ubuntu-22.04
378
strategy:

.github/workflows/gcc.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: GCC
2+
3+
on: push
4+
5+
jobs:
6+
gcc:
7+
runs-on: ubuntu-22.04
8+
strategy:
9+
fail-fast: false
10+
matrix:
11+
version: [9, 10, 11]
12+
steps:
13+
# Checks-out the repository under $GITHUB_WORKSPACE.
14+
- uses: actions/checkout@v3
15+
with:
16+
submodules: 'recursive'
17+
- name: Install Debian packages
18+
run: |
19+
sudo apt-get update
20+
sudo apt-get install -y cmake g++-${{ matrix.version }} pkg-config
21+
- name: Build with GNU GCC ${{ matrix.version }}
22+
run: |
23+
export CXX=g++-${{ matrix.version }}
24+
export CC=gcc-${{ matrix.version }}
25+
cd $GITHUB_WORKSPACE
26+
mkdir build
27+
cd build
28+
cmake ../
29+
make -j4
30+
- name: Run tests
31+
run: |
32+
cd "$GITHUB_WORKSPACE/build"
33+
ctest -V

readme.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# sha256 - calculate SHA-256 message digest
22

3-
[![GitHub CI status](https://github.com/striezel/secure-hash-algorithm/workflows/GitHub%20CI/badge.svg)](https://github.com/striezel/secure-hash-algorithm/actions)
3+
[![GitHub GCC status](https://github.com/striezel/secure-hash-algorithm/workflows/GCC/badge.svg)](https://github.com/striezel/secure-hash-algorithm/actions)
4+
[![GitHub Clang status](https://github.com/striezel/secure-hash-algorithm/workflows/Clang/badge.svg)](https://github.com/striezel/secure-hash-algorithm/actions)
45
[![GitLab pipeline status](https://gitlab.com/striezel/secure-hash-algorithm/badges/master/pipeline.svg)](https://gitlab.com/striezel/secure-hash-algorithm/-/pipelines)
56

67
## Purpose of the program

0 commit comments

Comments
 (0)