File tree 2 files changed +25
-3
lines changed
2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change 6
6
pull_request :
7
7
jobs :
8
8
test-check :
9
- name : runner / ast-grep (github-check)
10
- runs-on : ubuntu-latest
9
+ strategy :
10
+ matrix :
11
+ os :
12
+ - ubuntu-latest
13
+ - macos-latest
14
+ name : runner (${{ matrix.os }}) / ast-grep (github-check)
15
+ runs-on : ${{ matrix.os }}
11
16
steps :
12
17
- uses : actions/checkout@v4
13
18
- uses : ./
Original file line number Diff line number Diff line change @@ -21,14 +21,31 @@ echo '::group::🐶 Installing ast-grep ... https://github.com/ast-grep/ast-grep
21
21
TEMP_PATH=" $( mktemp -d) "
22
22
PATH=" ${TEMP_PATH} :$PATH "
23
23
24
+ unameOS=" $( uname -s) "
25
+ case " ${unameOS} " in
26
+ Linux* ) os=unknown-linux-gnu ;;
27
+ Darwin* ) os=apple-darwin ;;
28
+ * ) echo " Unsupported system: ${unameOS} " && exit 1 ;;
29
+ esac
30
+
31
+ unameArch=" $( uname -m) "
32
+ case " ${unameArch} " in
33
+ x86* ) arch=x86_64 ;;
34
+ aarch64* ) arch=aarch64 ;;
35
+ arm64* ) arch=aarch64 ;;
36
+ * ) echo " Unsupported architecture: ${unameArch} " && exit 1 ;;
37
+ esac
38
+
24
39
curl --silent --show-error --fail \
25
- --location " https://github.com/ast-grep/ast-grep/releases/download/${INPUT_SG_VERSION} /app-x86_64-unknown-linux-gnu .zip" \
40
+ --location " https://github.com/ast-grep/ast-grep/releases/download/${INPUT_SG_VERSION} /app-${arch} - ${os} .zip" \
26
41
--output " ${TEMP_PATH} /sg.zip"
27
42
28
43
unzip -u " ${TEMP_PATH} /sg.zip" -d " ${TEMP_PATH} /temp-sg"
29
44
install " ${TEMP_PATH} /temp-sg/ast-grep" " ${TEMP_PATH} "
30
45
rm -rf " ${TEMP_PATH} /sg.zip" " ${TEMP_PATH} /temp-sg"
31
46
47
+ ast-grep --version
48
+
32
49
echo ' ::endgroup::'
33
50
34
51
echo ' ::group:: Running ast-grep with reviewdog 🐶 ...'
You can’t perform that action at this time.
0 commit comments