-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (67 loc) · 2.81 KB
/
daily.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
name: daily
on:
schedule:
- cron: "14 14 * * *"
#Uncomment below to test.
#push:
# branches: [gha-test-*]
jobs:
audit:
runs-on: ubuntu-latest
container:
image: libra/build_environment:github-1
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/build-setup
- name: install cargo-audit
run: cargo install --force cargo-audit
# NOTE ignored advisory rules
# RUSTSEC-2018-0015 - term
# RUSTSEC-2019-0031 - spin
- name: audit crates
run: |
$CARGO $CARGOFLAGS audit --deny-warnings \
--ignore RUSTSEC-2018-0015 \
--ignore RUSTSEC-2019-0031 \
--ignore RUSTSEC-2020-0016
- uses: ./.github/actions/build-teardown
coverage:
runs-on: ubuntu-latest-xl
container:
image: libra/build_environment:github-1
env:
CODECOV_OUTPUT: codecov
MESSAGE_PAYLOAD_FILE: /tmp/message
steps:
- uses: actions/checkout@v2
- uses: ./.github/actions/build-setup
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.DIEM_S3_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.DIEM_S3_AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.DIEM_S3_AWS_REGION }}
- name: produce coverage
run: cargo xtest --html-cov-dir=$CODECOV_OUTPUT/grcovhtml/ --html-lcov-dir=$CODECOV_OUTPUT/lcovhtml/ --no-fail-fast -j 16 || true
- name: Push Coverage Reports to S3
run: |
set -x
SUFFIX="$(date +"%Y-%m-%d")-$(git rev-parse --short=8 HEAD)"
PREFIX="ci-artifacts.diem.com/coverage";
#Push grcov
aws s3 cp --recursive ${CODECOV_OUTPUT}/grcovhtml "s3://${PREFIX}/unit-coverage/${SUFFIX}/";
aws s3 cp --recursive ${CODECOV_OUTPUT}/grcovhtml "s3://${PREFIX}/unit-coverage/latest/";
echo "Grcov available in s3 https://${PREFIX}/unit-coverage/${SUFFIX}/index.html" >> ${MESSAGE_PAYLOAD_FILE}
#Push lcov
aws s3 cp --recursive ${CODECOV_OUTPUT}/lcovhtml "s3://${PREFIX}/lcov-unit-coverage/${SUFFIX}/";
aws s3 cp --recursive ${CODECOV_OUTPUT}/lcovhtml "s3://${PREFIX}/lcov-unit-coverage/latest/";
echo "lcov available in s3 https://${PREFIX}/lcov-unit-coverage/${SUFFIX}/index.html" >> ${MESSAGE_PAYLOAD_FILE}
# Disabling for now as this is not critical for job success. TODO: fix it up.
#- name: publish to codecov.io
# run: bash <(curl -s https://codecov.io/bash) -f $CODECOV_OUTPUT/lcovhtml/lcov.info -F unittest;
#- uses: ./.github/actions/slack-file
# with:
# webhook: ${{ secrets.COVERAGE_SLACK_WEBHOOK }}
# steps: ${{ env.MESSAGE_PAYLOAD_FILE }}
# if: always()
#- uses: ./.github/actions/build-teardown