Skip to content

Commit cf58641

Browse files
committed
migrate from travis CI to GitHub actions
Signed-off-by: Steffen Jaeckel <s@jaeckel.eu>
1 parent 5c30a53 commit cf58641

File tree

4 files changed

+71
-115
lines changed

4 files changed

+71
-115
lines changed

.ci/coverage.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ fi
3737
bash .ci/coverage_more.sh "$5" > test_coverage_more.txt || { rm -f testok.txt && exit 1 ; }
3838

3939
make lcov-single
40-
# if this isn't run on Travis CI create coverage locally
41-
if [ "$TRAVIS" == "" ]; then
40+
# if this isn't run on CI create coverage locally
41+
if [ "$CI" == "" ]; then
4242
make lcov-html
4343
else
44-
coveralls-lcov coverage.info
44+
coveralls-lcov coverage.info --service-job-id="$GITHUB_RUN_ID" --service-name="github" --repo-token="$REPO_TOKEN" --branch="$GITHUB_REF_NAME" --service-pull-request="$PR_NUMBER"
4545
fi
4646

4747
exit 0

.github/workflows/main.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
- /^release\/.*$/
9+
pull_request:
10+
branches:
11+
- master
12+
- develop
13+
- /^release\/.*$/
14+
15+
jobs:
16+
Build:
17+
runs-on: ${{ matrix.os }}
18+
strategy:
19+
matrix:
20+
cc: [ gcc, clang ]
21+
os: [ ubuntu-18.04 ]
22+
config:
23+
- { BUILDNAME: 'META_BUILDS', BUILDOPTIONS: '-DGMP_DESC', BUILDSCRIPT: '.ci/meta_builds.sh' }
24+
- { BUILDNAME: 'VALGRIND', BUILDOPTIONS: '', BUILDSCRIPT: '.ci/valgrind.sh' }
25+
- { BUILDNAME: 'STOCK', BUILDOPTIONS: '', BUILDSCRIPT: '.ci/run.sh' }
26+
- { BUILDNAME: 'STOCK-MPI', BUILDOPTIONS: '-ULTM_DESC -UTFM_DESC -UUSE_LTM -UUSE_TFM', BUILDSCRIPT: '.ci/run.sh' }
27+
- { BUILDNAME: 'EASY', BUILDOPTIONS: '-DLTC_EASY', BUILDSCRIPT: '.ci/run.sh' }
28+
- { BUILDNAME: 'SMALL', BUILDOPTIONS: '-DLTC_SMALL_CODE', BUILDSCRIPT: '.ci/run.sh' }
29+
- { BUILDNAME: 'NOTABLES', BUILDOPTIONS: '-DLTC_NO_TABLES', BUILDSCRIPT: '.ci/run.sh' }
30+
- { BUILDNAME: 'SMALL+NOTABLES', BUILDOPTIONS: '-DLTC_SMALL_CODE -DLTC_NO_TABLES', BUILDSCRIPT: '.ci/run.sh' }
31+
- { BUILDNAME: 'NO_FAST', BUILDOPTIONS: '-DLTC_NO_FAST', BUILDSCRIPT: '.ci/run.sh' }
32+
- { BUILDNAME: 'NO_FAST+NOTABLES', BUILDOPTIONS: '-DLTC_NO_FAST -DLTC_NO_TABLES', BUILDSCRIPT: '.ci/run.sh' }
33+
- { BUILDNAME: 'NO_ASM', BUILDOPTIONS: '-DLTC_NO_ASM', BUILDSCRIPT: '.ci/run.sh' }
34+
- { BUILDNAME: 'NO_TIMING_RESISTANCE', BUILDOPTIONS: '-DLTC_NO_ECC_TIMING_RESISTANT -DLTC_NO_RSA_BLINDING', BUILDSCRIPT: '.ci/run.sh' }
35+
- { BUILDNAME: 'PTHREAD', BUILDOPTIONS: '-DLTC_PTHREAD', BUILDSCRIPT: '.ci/run.sh' }
36+
- { BUILDNAME: 'STOCK+ARGTYPE=1', BUILDOPTIONS: '-DARGTYPE=1', BUILDSCRIPT: '.ci/run.sh' }
37+
- { BUILDNAME: 'STOCK+ARGTYPE=2', BUILDOPTIONS: '-DARGTYPE=2', BUILDSCRIPT: '.ci/run.sh' }
38+
- { BUILDNAME: 'STOCK+ARGTYPE=3', BUILDOPTIONS: '-DARGTYPE=3', BUILDSCRIPT: '.ci/run.sh' }
39+
- { BUILDNAME: 'STOCK+ARGTYPE=4', BUILDOPTIONS: '-DARGTYPE=4', BUILDSCRIPT: '.ci/run.sh' }
40+
steps:
41+
- uses: actions/checkout@v2
42+
- name: install dependencies
43+
run: |
44+
sudo apt-get update -qq
45+
sudo apt-get install -y libtommath-dev libgmp-dev libtfm-dev valgrind libtool-bin clang-tools lcov
46+
sudo gem install coveralls-lcov
47+
curl -s https://packagecloud.io/install/repositories/libtom/packages/script.deb.sh | sudo bash
48+
sudo apt-get install libtfm1=0.13-5ubuntu1
49+
- name: run tests
50+
env:
51+
CC: "${{ matrix.cc }}"
52+
PR_NUMBER: ${{ github.event.number }}
53+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
run: |
55+
bash "${{ matrix.config.BUILDSCRIPT }}" "${{ matrix.config.BUILDNAME }}" "-DUSE_LTM -DLTM_DESC" "makefile V=1" "${{ matrix.config.BUILDOPTIONS }}" "-ltommath"
56+
bash "${{ matrix.config.BUILDSCRIPT }}" "${{ matrix.config.BUILDNAME }}" "-DUSE_TFM -DTFM_DESC" "makefile.shared V=1" "${{ matrix.config.BUILDOPTIONS }}" "-ltfm"
57+
- name: regular logs
58+
if: ${{ !failure() }}
59+
run: |
60+
cat gcc_1.txt
61+
cat gcc_2.txt
62+
- name: error logs
63+
if: ${{ failure() }}
64+
run: |
65+
cat test_std.txt
66+
cat test_err.txt
67+
cat tv.txt

.travis.yml

Lines changed: 0 additions & 111 deletions
This file was deleted.

makefile_include.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ endif # LTC_SMALL
120120

121121
ifneq ($(findstring clang,$(CC)),)
122122
LTC_CFLAGS += -Wno-typedef-redefinition -Wno-tautological-compare -Wno-builtin-requires-header
123-
LTC_CFLAGS += -Wno-missing-field-initializers -Wno-missing-braces
123+
LTC_CFLAGS += -Wno-missing-field-initializers -Wno-missing-braces -Wno-incomplete-setjmp-declaration
124124
endif
125125
ifneq ($(findstring mingw,$(CC)),)
126126
LTC_CFLAGS += -Wno-shadow -Wno-attributes

0 commit comments

Comments
 (0)