-
Notifications
You must be signed in to change notification settings - Fork 42
86 lines (75 loc) · 2.2 KB
/
build.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Build
on:
push:
release:
types:
- created
pull_request:
schedule:
- cron: '0 6 1 * *'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
emacs_version:
- 26.1
- 26.3
- 27.2
- 28.2
- 29.1
- 29.4
steps:
- name: Setup emacs-ci-nix for ${{ matrix.emacs_version }}
uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs_version }}
- name: Setup Cask
uses: conao3/setup-cask@master
- name: Checkout repository
uses: actions/checkout@v4
- name: Install ripgrep
env:
REPO: BurntSushi/ripgrep
run: |
RELEASE_TAG=$(curl -sL --fail \
-H 'Accept: application/vnd.github.v3+json' \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
'https://api.github.com/repos/BurntSushi/ripgrep/releases/latest' \
| jq -r '.name')
PACKAGE_NAME=ripgrep-${RELEASE_TAG}-x86_64-unknown-linux-musl.tar.gz
curl -sL --fail \
-H "Accept: application/vnd.github.v3+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
"https://api.github.com/repos/${REPO}/releases/tags/${RELEASE_TAG}" \
| jq -r ".assets | .[] | select(.name==\"${PACKAGE_NAME}\") | .url" \
| tee asset.url
curl -sL --fail \
-H "Accept: application/octet-stream" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-o "${PACKAGE_NAME}" \
"$(cat asset.url)"
tar xf ${PACKAGE_NAME}
echo "$PWD/$(basename -s .tar.gz $PACKAGE_NAME)" >> $GITHUB_PATH
- name: Install emacs deps
run: make deps
- name: Run tests
run: |
emacs --version
rg --version
make test
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
flag-name: emacs-${{ matrix.emacs_version }}
parallel: true
finish:
needs: tests
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true