forked from melpa/melpa
-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 1.21 KB
/
ci.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
name: CI
on: [push, pull_request]
# Explicitly set workflow permissions to avoid additional permissions being added from
# the Github UI.
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- name: Install dependencies
run: |
sudo apt-get install emacs # emacs 26 on ubuntu 20
sudo apt-get install git jq mercurial texinfo
# Work around SSL-related failures, see
# https://stackoverflow.com/questions/21477683/mercurial-https-clone-abort-error-wrong-version-number
echo -e "[ui]\ntls = False" >> $HOME/.hgrc
# enable mercurial's purge extension:
echo -e "[extensions]\npurge =" >> $HOME/.hgrc
- name: Run CI script
run: |
[ "$GITHUB_EVENT_NAME" = "push" ] \
&& export CHANGED_FILES=$(git diff-tree --name-only --no-commit-id -r ${{ github.sha }})
[ "$GITHUB_EVENT_NAME" = "pull_request" ] \
&& export CHANGED_FILES=$(\
curl --silent https://api.github.com/repos/"$GITHUB_REPOSITORY"/pulls/${{ github.event.pull_request.number }}/files \
| jq -r '.[] | .filename')
./.github/workflows/ci.sh