Skip to content

Commit e7765eb

Browse files
submodule update as github checkout@v2 action (#594)
Signed-off-by: Alexey Chernyshov <[email protected]>
1 parent a945200 commit e7765eb

File tree

7 files changed

+80
-108
lines changed

7 files changed

+80
-108
lines changed

.github/disabled_workflows/clang-tidy.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,9 @@ jobs:
1313
runs-on: macOS-latest
1414
steps:
1515
- uses: actions/checkout@v2
16+
with:
17+
submodules: 'recursive'
1618
name: checkout repo
17-
- name: checkout submodules
18-
shell: bash
19-
run: |
20-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
21-
git submodule sync --recursive
22-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
2319
- name: install
2420
run: |
2521
brew install ninja llvm pkg-config

.github/disabled_workflows/msan.yml

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#TODO: uncomment if MSAN is required. Note: all dependencies must be instrumented to pass.
1+
##TODO: uncomment if MSAN is required. Note: all dependencies must be instrumented to pass.
22
#name: MSAN
33
#
44
#on:
@@ -14,6 +14,8 @@
1414
# runs-on: ubuntu-20.04
1515
# steps:
1616
# - uses: actions/checkout@v2
17+
# with:
18+
# submodules: 'recursive'
1719
# name: checkout repo
1820
# - name: cache
1921
# uses: actions/[email protected]
@@ -23,12 +25,6 @@
2325
# with:
2426
# path: /var/tmp/filecoin-proof-parameters
2527
# key: build-${{ env.cache-name }}-${{ env.version }}
26-
# - name: checkout submodules
27-
# shell: bash
28-
# run: |
29-
# auth_header="$(git config --local --get http.https://github.com/.extraheader)"
30-
# git submodule sync --recursive
31-
# git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
3228
# - name: install
3329
# run: |
3430
# sudo apt-get update

.github/workflows/asan.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: ubuntu-20.04
1414
steps:
1515
- uses: actions/checkout@v2
16+
with:
17+
submodules: 'recursive'
1618
name: checkout repo
1719
- name: cache
1820
uses: actions/[email protected]
@@ -22,12 +24,6 @@ jobs:
2224
with:
2325
path: /var/tmp/filecoin-proof-parameters
2426
key: build-${{ env.cache-name }}-${{ env.version }}
25-
- name: checkout submodules
26-
shell: bash
27-
run: |
28-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
29-
git submodule sync --recursive
30-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
3127
- name: install
3228
run: |
3329
sudo apt-get update

.github/workflows/ci.yml

Lines changed: 67 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ name: CI
33
on:
44
push:
55
branches:
6-
- master
6+
- master
77
pull_request:
88
branches:
9-
- master
9+
- master
1010

1111
jobs:
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/[email protected]
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/[email protected]
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

.github/workflows/lsan.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: ubuntu-20.04
1414
steps:
1515
- uses: actions/checkout@v2
16+
with:
17+
submodules: 'recursive'
1618
name: checkout repo
1719
- name: cache
1820
uses: actions/[email protected]
@@ -22,12 +24,6 @@ jobs:
2224
with:
2325
path: /var/tmp/filecoin-proof-parameters
2426
key: build-${{ env.cache-name }}-${{ env.version }}
25-
- name: checkout submodules
26-
shell: bash
27-
run: |
28-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
29-
git submodule sync --recursive
30-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
3127
- name: install
3228
run: |
3329
sudo apt-get update

.github/workflows/tsan.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: macOS-latest
1414
steps:
1515
- uses: actions/checkout@v2
16+
with:
17+
submodules: 'recursive'
1618
name: checkout repo
1719
- name: cache
1820
uses: actions/[email protected]
@@ -22,12 +24,6 @@ jobs:
2224
with:
2325
path: /var/tmp/filecoin-proof-parameters
2426
key: build-${{ env.cache-name }}-${{ env.version }}
25-
- name: checkout submodules
26-
shell: bash
27-
run: |
28-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
29-
git submodule sync --recursive
30-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
3127
- name: install
3228
run: |
3329
echo "LIBRARY_PATH=$LIBRARY_PATH:/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib" >> $GITHUB_ENV

.github/workflows/ubsan.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ jobs:
1313
runs-on: ubuntu-20.04
1414
steps:
1515
- uses: actions/checkout@v2
16+
with:
17+
submodules: 'recursive'
1618
name: checkout repo
1719
- name: cache
1820
uses: actions/[email protected]
@@ -22,12 +24,6 @@ jobs:
2224
with:
2325
path: /var/tmp/filecoin-proof-parameters
2426
key: build-${{ env.cache-name }}-${{ env.version }}
25-
- name: checkout submodules
26-
shell: bash
27-
run: |
28-
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
29-
git submodule sync --recursive
30-
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
3127
- name: install
3228
run: |
3329
sudo apt-get update

0 commit comments

Comments
 (0)