@@ -3,10 +3,10 @@ name: CI
33on :
44 push :
55 branches :
6- - master
6+ - master
77 pull_request :
88 branches :
9- - master
9+ - master
1010
1111jobs :
1212 build :
@@ -15,14 +15,14 @@ jobs:
1515 fail-fast : false
1616 matrix :
1717 # 3 jobs in total
18- os : [ubuntu-20.04, macOS-latest]
19- compiler : [{
18+ os : [ ubuntu-20.04, macOS-latest ]
19+ compiler : [ {
2020 " cc " : " gcc" ,
2121 " cxx " : " g++"
22- }, {
22+ }, {
2323 " cc " : " clang" ,
2424 " cxx " : " clang++"
25- }]
25+ } ]
2626 exclude :
2727 - os : macOS-latest
2828 compiler :
@@ -37,68 +37,64 @@ jobs:
3737 CFLAGS : " -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
3838 CXXFLAGS : " -isysroot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include"
3939 steps :
40- - uses : actions/checkout@v2
41- name : checkout repo
42- - name : cache
43- uses : actions/cache@v1.2.0
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+ uses : actions/cache@v1.2.0
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