Commit e8e5625 1 parent 7715001 commit e8e5625 Copy full SHA for e8e5625
File tree 11 files changed +278
-265
lines changed
11 files changed +278
-265
lines changed Original file line number Diff line number Diff line change 1
- name : ' Cache'
2
- description : " This action caches fixtures"
1
+ name : Cache
2
+
3
+ description : This action caches fixtures
4
+
3
5
outputs :
4
6
cache-hit :
5
- description : ' Cache hit'
6
- value : ${{ steps.cache_output.outputs.cache-hit }}
7
+ description : Cache hit
8
+ value : ${{ steps.cache.outputs.cache-hit }}
9
+
7
10
runs :
8
- using : " composite"
11
+ using : composite
9
12
steps :
10
13
- uses : actions/cache@v4
11
- id : cache_fixtures
14
+ id : cache
12
15
with :
13
16
path : |
14
17
test/fixtures/grammars
15
18
target/release/tree-sitter-*.wasm
16
19
key : fixtures-${{ join(matrix.*, '_') }}-${{ hashFiles(
17
- ' cli/src/ generate/**' ,
18
- ' script/generate-fixtures *' ,
20
+ ' cli/generate/src /**' ,
21
+ ' xtask/src/ *' ,
19
22
' test/fixtures/grammars/*/**/src/*.c' ,
20
23
' .github/actions/cache/action.yml' ) }}
21
-
22
- - run : echo "cache-hit=${{ steps.cache_fixtures.outputs.cache-hit }}" >> $GITHUB_OUTPUT
23
- shell : bash
24
- id : cache_output
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/bash -eu
2
2
3
- # set -x
4
- set -e
5
-
6
- if [ " $BUILD_CMD " != " cross" ]; then
7
- echo " cross.sh - is a helper to assist only in cross compiling environments" >&2
8
- echo " To use this tool set the BUILD_CMD env var to the \" cross\" value" >&2
9
- exit 111
10
- fi
11
-
12
- if [ -z " $CROSS_IMAGE " ]; then
13
- echo " The CROSS_IMAGE env var should be provided" >&2
14
- exit 111
15
- fi
16
-
17
- docker run --rm -v /home/runner:/home/runner -w " $PWD " " $CROSS_IMAGE " " $@ "
3
+ exec docker run --rm -v /home/runner:/home/runner -w " $PWD " " $CROSS_IMAGE " " $@ "
Original file line number Diff line number Diff line change 1
- #! /bin/bash
1
+ #! /bin/bash -eu
2
2
3
- # set -x
4
- set -e
3
+ tree_sitter=" $ROOT " /target/" $TARGET " /release/tree-sitter
5
4
6
- if [ " $BUILD_CMD " == " cross" ]; then
7
- if [ -z " $CC " ]; then
8
- echo " make.sh: CC is not set" >&2
9
- exit 111
10
- fi
11
- if [ -z " $AR " ]; then
12
- echo " make.sh: AR is not set" >&2
13
- exit 111
14
- fi
15
-
16
- cross.sh make CC=$CC AR=$AR " $@ "
5
+ if [[ $BUILD_CMD == cross ]]; then
6
+ cross.sh make CC=" $CC " AR=" $AR " " $@ "
17
7
else
18
- make " $@ "
8
+ exec make " $@ "
19
9
fi
Original file line number Diff line number Diff line change 1
- #! /bin/bash
2
-
3
- # set -x
4
- set -e
5
-
6
- if [ -z " $ROOT " ]; then
7
- echo " The ROOT env var should be set to absolute path of a repo root folder" >&2
8
- exit 111
9
- fi
10
-
11
- if [ -z " $TARGET " ]; then
12
- echo " The TARGET env var should be equal to a \` cargo build --target <TARGET>\` command value" >&2
13
- exit 111
14
- fi
1
+ #! /bin/bash -eu
15
2
16
3
tree_sitter=" $ROOT " /target/" $TARGET " /release/tree-sitter
17
4
18
- if [ " $BUILD_CMD " == " cross" ]; then
19
- if [ -z " $CROSS_RUNNER " ]; then
20
- echo " The CROSS_RUNNER env var should be set to a CARGO_TARGET_*_RUNNER env var value" >&2
21
- echo " that is available in a docker image used by the cross tool under the hood" >&2
22
- exit 111
23
- fi
24
-
25
- cross.sh $CROSS_RUNNER " $tree_sitter " " $@ "
5
+ if [[ $BUILD_CMD == cross ]]; then
6
+ cross.sh " $CROSS_RUNNER " " $tree_sitter " " $@ "
26
7
else
27
- " $tree_sitter " " $@ "
8
+ exec " $tree_sitter " " $@ "
28
9
fi
Original file line number Diff line number Diff line change 1
- name : backport
1
+ name : Backport Pull Request
2
+
2
3
on :
3
4
pull_request_target :
4
5
types : [closed, labeled]
6
+
7
+ permissions :
8
+ contents : write
9
+ pull-requests : write
10
+
5
11
jobs :
6
12
backport :
7
- permissions :
8
- contents : write
9
- pull-requests : write
10
- name : Backport Pull Request
11
13
if : github.event.pull_request.merged
12
14
runs-on : ubuntu-latest
13
15
steps :
14
- - uses : actions/checkout@v4
16
+ - name : Checkout repository
17
+ uses : actions/checkout@v4
15
18
16
- - uses : actions/create-github-app-token@v1
19
+ - name : Create app token
20
+ uses : actions/create-github-app-token@v1
17
21
id : app-token
18
22
with :
19
23
app-id : ${{ vars.BACKPORT_APP }}
20
24
private-key : ${{ secrets.BACKPORT_KEY }}
21
25
22
26
- name : Create backport PR
23
- id : backport
24
27
uses : korthout/backport-action@v3
25
28
with :
26
29
pull_title : " ${pull_title}"
You can’t perform that action at this time.
0 commit comments