9
9
branches :
10
10
- main
11
11
12
+ concurrency :
13
+ group : ${{ github.workflow }}-${{ github.ref }}
14
+ cancel-in-progress : true
15
+
12
16
jobs :
13
17
linux-gcc :
14
18
runs-on : ubuntu-latest
25
29
CC : ${{ matrix.config.cc }}
26
30
CXX : ${{ matrix.config.cxx }}
27
31
steps :
28
- - name : Cancel previous
29
- uses : styfle/cancel-workflow-action@0.11.0
30
- with :
31
- access_token : ${{ github.token }}
32
-
33
32
- name : Runner workspace path
34
33
run : |
35
34
echo "Cleaning up previous run"
73
72
CC : ${{ matrix.config.cc }}
74
73
CXX : ${{ matrix.config.cxx }}
75
74
steps :
76
- - name : Cancel previous
77
- uses : styfle/cancel-workflow-action@0.11.0
78
- with :
79
- access_token : ${{ github.token }}
80
-
81
75
- name : Install ssh-agent
82
76
run : |
83
77
cd /opt && curl -L -o yumvault.tar.gz https://github.com/os-fpga/post_build_artifacts/releases/download/v0.2/yumvaultn.tar.gz && tar xvzf yumvault.tar.gz && ls -l && mv etc/yum.repos.d/Custom.repo /etc/yum.repos.d
@@ -100,7 +94,20 @@ jobs:
100
94
yum install -y git
101
95
102
96
- name : Checkout repo
103
- uses : actions/checkout@v3
97
+ run : |
98
+ git config --global --add safe.directory $GITHUB_WORKSPACE
99
+ git init $GITHUB_WORKSPACE
100
+ git remote add origin https://github.com/$GITHUB_REPOSITORY
101
+ git remote -v
102
+ git config --local gc.auto 0
103
+ if [[ "${{ github.event_name }}" == "pull_request" ]]; then
104
+ git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/* +${{ github.sha }}:refs/remotes/pull/${{ github.event.pull_request.number }}/merge
105
+ git checkout --progress --force refs/remotes/pull/${{ github.event.pull_request.number }}/merge
106
+ else
107
+ git -c protocol.version=2 fetch --prune --progress --no-recurse-submodules origin +refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/tags/*
108
+ git checkout origin/$GITHUB_REF_NAME
109
+ fi
110
+ git log -1 --format='%H'
104
111
105
112
- name : Install dependencies
106
113
run : |
0 commit comments