@@ -3,10 +3,10 @@ name: CI
3
3
on :
4
4
push :
5
5
branches :
6
- - master
6
+ - master
7
7
pull_request :
8
8
branches :
9
- - master
9
+ - master
10
10
11
11
jobs :
12
12
build :
@@ -15,14 +15,14 @@ jobs:
15
15
fail-fast : false
16
16
matrix :
17
17
# 3 jobs in total
18
- os : [ubuntu-20.04, macOS-latest]
19
- compiler : [{
18
+ os : [ ubuntu-20.04, macOS-latest ]
19
+ compiler : [ {
20
20
" cc " : " gcc" ,
21
21
" cxx " : " g++"
22
- }, {
22
+ }, {
23
23
" cc " : " clang" ,
24
24
" cxx " : " clang++"
25
- }]
25
+ } ]
26
26
exclude :
27
27
- os : macOS-latest
28
28
compiler :
@@ -37,68 +37,64 @@ jobs:
37
37
CFLAGS : " -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
38
38
CXXFLAGS : " -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
39
39
steps :
40
- - uses : actions/checkout@v2
41
- name : checkout repo
42
- - name : cache
43
-
44
- env :
45
- cache-name : cache-filecoin-ffi-proofs
46
- version : v28
47
- with :
48
- path : /var/tmp/filecoin-proof-parameters
49
- key : build-${{ env.cache-name }}-${{ env.version }}
50
- - name : checkout submodules
51
- shell : bash
52
- run : |
53
- auth_header="$(git config --local --get http.https://github.com/.extraheader)"
54
- git submodule sync --recursive
55
- git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
56
- - name : install dependencies
57
- run : |
58
- set -e
59
- if [ "$RUNNER_OS" = "macOS" ]; then
60
- echo "LIBRARY_PATH=$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV
61
- brew install ninja pkg-config libb2 hwloc
62
- else
63
- sudo apt-get update
64
- sudo apt-get install -y ninja-build python-setuptools pkg-config ocl-icd-* opencl-headers libhwloc-dev
65
- fi
66
-
67
- pip3 -V || sudo python3 -m pip install --upgrade pip
68
- sudo pip3 install scikit-build
69
- sudo pip3 install requests gitpython gcovr pyyaml
70
- sudo curl https://sh.rustup.rs -sSf | sh -s -- -y
71
-
72
- # Workaround to provide additional free space for testing.
73
- # https://github.com/actions/virtual-environments/issues/2875
74
- sudo rm -rf /usr/share/dotnet
75
- sudo rm -rf /opt/ghc
76
- - name : cmake
77
- env :
78
- CC : ${{ matrix.compiler.cc }}
79
- CXX : ${{ matrix.compiler.cxx }}
80
- CFLAGS : ${{ matrix.env.CFLAGS }}
81
- CXXFLAGS : ${{ matrix.env.CXXFLAGS }}
82
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # has to be included to access other secrets
83
- GITHUB_HUNTER_USERNAME : ${{ secrets.HUNTER_USERNAME }}
84
- GITHUB_HUNTER_TOKEN : ${{ secrets.HUNTER_TOKEN }}
85
- COVERAGE : ${{ matrix.env.COVERAGE }}
86
- run : cmake . -GNinja -Bbuild $COVERAGE -D TESTING_PROOFS=ON -D TESTING_ACTORS=ON
87
- - name : build
88
- run : cmake --build build -- -j2
89
- - name : tests
90
- env :
91
- CTEST_OUTPUT_ON_FAILURE : 1
92
- run : cmake --build build --target test
93
- - name : prepare coverage report
94
- if : runner.os == 'Linux' && matrix.compiler.cc == 'gcc'
95
- run : cmake --build build --target ctest_coverage_norun
96
- - name : upload report to codecov
97
- if : runner.os == 'Linux' && matrix.compiler.cc == 'gcc'
98
- uses : codecov/codecov-action@v1
99
- env :
100
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # has to be included to access other secrets
101
- with :
102
- token : ${{ secrets.CODECOV_TOKEN }}
103
- file : ./build/ctest_coverage_norun.xml
104
- name : codecov-umbrella
40
+ - uses : actions/checkout@v2
41
+ with :
42
+ submodules : ' recursive'
43
+ name : checkout repo
44
+ - name : cache
45
+
46
+ env :
47
+ cache-name : cache-filecoin-ffi-proofs
48
+ version : v28
49
+ with :
50
+ path : /var/tmp/filecoin-proof-parameters
51
+ key : build-${{ env.cache-name }}-${{ env.version }}
52
+ - name : install dependencies
53
+ run : |
54
+ set -e
55
+ if [ "$RUNNER_OS" = "macOS" ]; then
56
+ echo "LIBRARY_PATH=$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV
57
+ brew install ninja pkg-config libb2 hwloc
58
+ else
59
+ sudo apt-get update
60
+ sudo apt-get install -y ninja-build python-setuptools pkg-config ocl-icd-* opencl-headers libhwloc-dev
61
+ fi
62
+
63
+ pip3 -V || sudo python3 -m pip install --upgrade pip
64
+ sudo pip3 install scikit-build
65
+ sudo pip3 install requests gitpython gcovr pyyaml
66
+ sudo curl https://sh.rustup.rs -sSf | sh -s -- -y
67
+
68
+ # Workaround to provide additional free space for testing.
69
+ # https://github.com/actions/virtual-environments/issues/2875
70
+ sudo rm -rf /usr/share/dotnet
71
+ sudo rm -rf /opt/ghc
72
+ - name : cmake
73
+ env :
74
+ CC : ${{ matrix.compiler.cc }}
75
+ CXX : ${{ matrix.compiler.cxx }}
76
+ CFLAGS : ${{ matrix.env.CFLAGS }}
77
+ CXXFLAGS : ${{ matrix.env.CXXFLAGS }}
78
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # has to be included to access other secrets
79
+ GITHUB_HUNTER_USERNAME : ${{ secrets.HUNTER_USERNAME }}
80
+ GITHUB_HUNTER_TOKEN : ${{ secrets.HUNTER_TOKEN }}
81
+ COVERAGE : ${{ matrix.env.COVERAGE }}
82
+ run : cmake . -GNinja -Bbuild $COVERAGE -D TESTING_PROOFS=ON -D TESTING_ACTORS=ON
83
+ - name : build
84
+ run : cmake --build build -- -j2
85
+ - name : tests
86
+ env :
87
+ CTEST_OUTPUT_ON_FAILURE : 1
88
+ run : cmake --build build --target test
89
+ - name : prepare coverage report
90
+ if : runner.os == 'Linux' && matrix.compiler.cc == 'gcc'
91
+ run : cmake --build build --target ctest_coverage_norun
92
+ - name : upload report to codecov
93
+ if : runner.os == 'Linux' && matrix.compiler.cc == 'gcc'
94
+ uses : codecov/codecov-action@v1
95
+ env :
96
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # has to be included to access other secrets
97
+ with :
98
+ token : ${{ secrets.CODECOV_TOKEN }}
99
+ file : ./build/ctest_coverage_norun.xml
100
+ name : codecov-umbrella
0 commit comments