-
Notifications
You must be signed in to change notification settings - Fork 1
136 lines (129 loc) · 4.54 KB
/
presubmit.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: Presubmit
on: [push, pull_request]
jobs:
pre_job:
runs-on: ubuntu-latest
outputs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@master
with:
concurrent_skipping: 'same_content'
skip_after_successful_duplicate: 'true'
paths_ignore: '["**/README.md"]'
do_not_skip: '["pull_request"]'
build-and-check:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Build and Check ${{ matrix.os }} ${{ matrix.compiler }}${{ matrix.threadsafe && ' ' || ' No Thread Safe' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
threadsafe: [true, false]
compiler: [gcc, g++, clang]
exclude:
- os: macos-latest
compiler: g++
steps:
- uses: actions/checkout@v3
- run: sudo apt update; sudo apt install -y ${{ matrix.compiler }} ruby-dev libgsl-dev python3-dev valgrind
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: brew install gsl automake libtool
if: ${{ matrix.os == 'macos-latest' }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
if: ${{ matrix.os == 'macos-latest' }}
- run: gem install --user-install rake ffi ffi-value whittle
- run: pip3 install --user parglare
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure --enable-strict${{ matrix.threadsafe && ' --enable-thread-safe' || ' --disable-thread-safe' }} CC=${{ matrix.compiler }}${{ (matrix.compiler == 'clang' && matrix.os == 'ubuntu-latest') && ' CFLAGS="-gdwarf-4 -O2"' || '' }}
working-directory: build
- run: make -j
working-directory: build
- run: make -j check
working-directory: build
- run: make -j check-valgrind-memcheck
working-directory: build
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: make -j check-valgrind-helgrind
working-directory: build
if: ${{ matrix.os == 'ubuntu-latest' }}
- uses: actions/upload-artifact@v2
if: failure()
with:
name: build-and-check
path: |
build/**/*.log
build/config.log
distcheck:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Distcheck ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- run: sudo apt update; sudo apt install -y gcc ruby-dev libgsl-dev python3-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: brew install gsl automake libtool
if: ${{ matrix.os == 'macos-latest' }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
if: ${{ matrix.os == 'macos-latest' }}
- run: gem install --user-install rake ffi ffi-value whittle
- run: pip3 install --user parglare
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure --enable-strict
working-directory: build
- run: make -j distcheck
working-directory: build
dist-check:
needs: pre_job
if: ${{ needs.pre_job.outputs.should_skip != 'true' }}
name: Dist and Check ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- run: sudo apt update; sudo apt install -y gcc ruby-dev libgsl-dev python3-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- run: brew install gsl automake libtool
if: ${{ matrix.os == 'macos-latest' }}
- uses: actions/setup-python@v4
with:
python-version: '3.11'
if: ${{ matrix.os == 'macos-latest' }}
- run: gem install --user-install rake ffi ffi-value whittle
- run: pip3 install --user parglare
- run: ./autogen.sh
- run: mkdir -p build
- run: ../configure --enable-strict
working-directory: build
- run: make dist
working-directory: build
- name: extract
run: tar -xzvf cconfigspace-*
working-directory: build
- name: configure
run: |
cd `find . -type d -name "cconfigspace-*"`
mkdir -p build
cd build
../configure
working-directory: build
- name: make check
run: |
cd `find . -type d -name "cconfigspace-*"`
cd build
make -j check
working-directory: build