forked from 0LNetworkCommunity/libra-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
70 lines (59 loc) · 2.52 KB
/
debug.yaml
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: rust ci
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"
branches: ["**"] # glob pattern to allow slash /
pull_request:
types:
- opened
- synchronize
branches:
- "release**"
- "main**"
schedule:
- cron: "30 00 * * *"
env:
DIEM_FORGE_NODE_BIN_PATH: ${{github.workspace}}/diem-node
LIBRA_CI: 1
MODE_0L: "TESTNET"
jobs:
upgrades:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
# NOTE: for debugging CI this allow shell access to github runner. Will print out tmate.io terminal url
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
# with:
# detached: true
# timeout-minutes: 5
- name: Check out code
uses: actions/checkout@v3
# should always run unless we know and expect the upgrade to be breaking. In that case we wither explicitly name the branch with breaking, or the commit message as "[breaking]" (for example in the PR title)
# echo "LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)" >> ${GITHUB_ENV}
# echo LAST_COMMIT_HEAD_MSG=${{github.event.head_commit.message}} >> ${GITHUB_ENV}
# echo LAST_COMMIT_MSG: ${{env.LAST_COMMIT_MSG}}
# echo contains breaking: ${{contains(env.LAST_COMMIT_MSG, '[breaking]')}}
- name: upgrade - should be backwards compatible
run: |
# export LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B)
echo LAST_COMMIT=$(git log $GITHUB_SHA --pretty=%B) >> ${GITHUB_ENV}
echo "COMMIT_BREAKING_ALT=${{contains(env.LAST_COMMIT, '[breaking]')}}" >> ${GITHUB_ENV}
echo "LAST_COMMIT_MSG=${{github.event.head_commit.message}}" >> ${GITHUB_ENV}
echo "COMMIT_BREAKING=${{contains(github.event.head_commit.message, '[breaking]')}}" >> ${GITHUB_ENV}
echo "BRANCH_BREAKING=${{contains(github.ref_name, 'breaking-') || contains(github.ref, 'breaking-') || contains(github.head_ref, 'breaking-')}}" >> ${GITHUB_ENV}
- name: should run
if: ${{env.BRANCH_BREAKING=='true' || env.COMMIT_BREAKING=='true'}}
run: |
echo LAST_COMMIT: ${{ env.LAST_COMMIT }}
echo LAST_COMMIT_MSG: ${{ env.LAST_COMMIT_MSG }}
echo COMMIT_BREAKING_ALT: ${{env.COMMIT_BREAKING_ALT}}
echo BRANCH_BREAKING: ${{ env.BRANCH_BREAKING }}
echo COMMIT_BREAKING: ${{ env.COMMIT_BREAKING }}
echo "should run"
- name: shoul not run
if: ${{!env.BRANCH_BREAKING=='true'}}
run:
echo "should not run"