-
Notifications
You must be signed in to change notification settings - Fork 5
89 lines (74 loc) · 2.7 KB
/
ccpp.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Test C code
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: compile
run: make
- name: Set up Go 1.14
uses: actions/setup-go@v1
with:
go-version: 1.14
id: go
- name: Go dependencies
run: go get 'golang.org/x/crypto/chacha20poly1305'
- name: tests
run: make check
test:
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
poly: [8, 16, 32, 64]
opt: ["-Os", "", "-O1", "-O2", "-O3"]
steps:
- uses: actions/checkout@v2
- name: go dependencies
run: go get 'golang.org/x/crypto/chacha20poly1305'
- name: test normal
env:
CFLAGS: "-fsanitize=address ${{matrix.opt}} ${{ matrix.path }} -DPOLY1305_${{matrix.poly}}BIT"
run: make clean check
- name: test slow
env:
CFLAGS: "-fsanitize=address ${{matrix.opt}} ${{ matrix.path }} -DPOLY1305_${{matrix.poly}}BIT -DTEST_SLOW_PATH"
run: make clean check
qa:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
# Disabling shallow clone is recommended for improving relevancy of reporting
fetch-depth: 0
- name: Sonarcloud
run: |
export SONAR_SCANNER_VERSION=4.2.0.1873
export SONAR_SCANNER_HOME=$HOME/.sonar/sonar-scanner-$SONAR_SCANNER_VERSION-linux
curl --create-dirs -sSLo $HOME/.sonar/sonar-scanner.zip https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-$SONAR_SCANNER_VERSION-linux.zip
unzip -o $HOME/.sonar/sonar-scanner.zip -d $HOME/.sonar/
export PATH=$SONAR_SCANNER_HOME/bin:$PATH
export SONAR_SCANNER_OPTS="-server"
curl --create-dirs -sSLo $HOME/.sonar/build-wrapper-linux-x86.zip https://sonarcloud.io/static/cpp/build-wrapper-linux-x86.zip
unzip -o $HOME/.sonar/build-wrapper-linux-x86.zip -d $HOME/.sonar/
export PATH=$HOME/.sonar/build-wrapper-linux-x86:$PATH
build-wrapper-linux-x86-64 --out-dir bw-output make clean check
sonar-scanner \
-Dsonar.organization=davylandman-github \
-Dsonar.projectKey=DavyLandman_portable8439 \
-Dsonar.sources=. \
-Dsonar.host.url=https://sonarcloud.io \
-Dsonar.cfamily.build-wrapper-output=bw-output
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# - name: cppcheck
# uses: deep5050/cppcheck-action@master
# with:
# github_token: ${{ secrets.GITHUB_TOKEN}}
# force_language: c
- name: c-linter
uses: AMReX-Astro/cpp-linter-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN}}