Skip to content

Commit 7ea529c

Browse files
committed
ci: Add "x86_64: Linux (Debian stable)" GitHub Actions job
1 parent 6d3d4b9 commit 7ea529c

File tree

2 files changed

+88
-0
lines changed

2 files changed

+88
-0
lines changed

.github/workflows/ci.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,36 @@
11
name: CI
22
on: [pull_request, push]
33

4+
env:
5+
### compiler options
6+
HOST:
7+
WRAPPER_CMD:
8+
# Specific warnings can be disabled with -Wno-error=foo.
9+
# -pedantic-errors is not equivalent to -Werror=pedantic and thus not implied by -Werror according to the GCC manual.
10+
WERROR_CFLAGS: '-Werror -pedantic-errors'
11+
MAKEFLAGS: '-j4'
12+
BUILD: 'check'
13+
### secp256k1 config
14+
ECMULTWINDOW: 'auto'
15+
ECMULTGENPRECISION: 'auto'
16+
ASM: 'no'
17+
WIDEMUL: 'auto'
18+
WITH_VALGRIND: 'yes'
19+
EXTRAFLAGS:
20+
### secp256k1 modules
21+
EXPERIMENTAL: 'no'
22+
ECDH: 'no'
23+
RECOVERY: 'no'
24+
SCHNORRSIG: 'no'
25+
ELLSWIFT: 'no'
26+
### test options
27+
SECP256K1_TEST_ITERS:
28+
BENCH: 'yes'
29+
SECP256K1_BENCH_ITERS: 2
30+
CTIMETESTS: 'yes'
31+
# Compile and run the examples.
32+
EXAMPLES: 'yes'
33+
434
jobs:
535
modified_files:
636
runs-on: ubuntu-latest
@@ -24,3 +54,57 @@ jobs:
2454
packages: write
2555
needs: modified_files
2656
if: contains(needs.modified_files.outputs.all, '.github/workflows/docker.yml') || contains(needs.modified_files.outputs.all, 'ci/linux-debian.Dockerfile')
57+
58+
x86_64_debian_stable:
59+
name: "x86_64: Linux (Debian stable)"
60+
runs-on: ubuntu-latest
61+
container: ghcr.io/${{ github.repository_owner }}/secp256k1-ci-image:latest
62+
needs: [modified_files, docker_image]
63+
if: ${{ always() }}
64+
65+
strategy:
66+
fail-fast: false
67+
matrix:
68+
env_var:
69+
- 'WIDEMUL=int64 RECOVERY=yes'
70+
- 'WIDEMUL=int64 ECDH=yes SCHNORRSIG=yes ELLSWIFT=yes'
71+
- 'WIDEMUL=int128'
72+
- 'WIDEMUL=int128_struct ELLSWIFT=yes'
73+
- 'WIDEMUL=int128 RECOVERY=yes SCHNORRSIG=yes ELLSWIFT=yes'
74+
- 'WIDEMUL=int128 ECDH=yes SCHNORRSIG=yes'
75+
- 'WIDEMUL=int128 ASM=x86_64 ELLSWIFT=yes'
76+
- ' RECOVERY=yes SCHNORRSIG=yes'
77+
- 'CTIMETESTS=no RECOVERY=yes ECDH=yes SCHNORRSIG=yes CPPFLAGS=-DVERIFY'
78+
- 'BUILD=distcheck WITH_VALGRIND=no CTIMETESTS=no BENCH=no'
79+
- 'CPPFLAGS=-DDETERMINISTIC'
80+
- 'CFLAGS=-O0 CTIMETESTS=no'
81+
- 'CFLAGS=-O1 RECOVERY=yes ECDH=yes SCHNORRSIG=yes ELLSWIFT=yes'
82+
- 'ECMULTGENPRECISION=2 ECMULTWINDOW=2'
83+
- 'ECMULTGENPRECISION=8 ECMULTWINDOW=4'
84+
cc: ['gcc', 'clang', 'gcc-snapshot', 'clang-snapshot']
85+
86+
steps:
87+
- name: Checkout
88+
uses: actions/checkout@v3
89+
90+
- name: Run test script
91+
env:
92+
CC: ${{ matrix.cc }}
93+
run: env ${{ matrix.env_var }} ./ci/cirrus.sh
94+
95+
- run: cat tests.log || true
96+
if: ${{ always() }}
97+
- run: cat noverify_tests.log || true
98+
if: ${{ always() }}
99+
- run: cat exhaustive_tests.log || true
100+
if: ${{ always() }}
101+
- run: cat ctime_tests.log || true
102+
if: ${{ always() }}
103+
- run: cat bench.log || true
104+
if: ${{ always() }}
105+
- run: cat config.log || true
106+
if: ${{ always() }}
107+
- run: cat test_env.log || true
108+
if: ${{ always() }}
109+
- run: env
110+
if: ${{ always() }}

ci/cirrus.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ set -eux
44

55
export LC_ALL=C
66

7+
if [ "${GITHUB_ACTIONS:-undefined}" = "true" ]; then
8+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
9+
fi
10+
711
# Print commit and relevant CI environment to allow reproducing the job outside of CI.
812
git show --no-patch
913
print_environment() {

0 commit comments

Comments
 (0)