-
Notifications
You must be signed in to change notification settings - Fork 16
97 lines (95 loc) · 4.09 KB
/
ci-macos.yaml
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
86
87
88
89
90
91
92
93
94
95
96
97
name: CI MacOS
on:
push:
paths-ignore:
- "cog.toml"
- "**.md"
- "skel/**"
- "assets/**"
- "docs/**"
- "modules/obsolete/**"
- ".gitignore/workflows/cocogitto.yaml"
- ".gitignore/workflows/jekyll-gh-pages.yaml"
pull_request:
workflow_dispatch:
# Run weekly
schedule:
- cron: "0 0 * * 0"
jobs:
ci-macos:
runs-on: macos-latest
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
emacs-version:
- 29.2
- 29.3
# 29.4 -- no need, it is an Org mode bugfix release
- release-snapshot
experimental: [false]
include:
- emacs-version: snapshot
experimental: true
steps:
- uses: actions/checkout@v4
- uses: purcell/setup-emacs@master
with:
version: ${{ matrix.emacs-version }}
- name: Show Emacs version
run: |
EMACS_VERSION=$(emacs --version)
echo $EMACS_VERSION
echo "EMACS_VERSION=$(echo $EMACS_VERSION | head -n1 | sed -E 's/GNU Emacs ([^ ]*).*/\1/')" >> "$GITHUB_ENV"
- name: Running MinEmacs with all modules
run: |
ln -s "$(pwd)" "../.emacs.d"
echo "Enabling all MinEmacs modules"
echo "Running Emacs with MinEmacs configuration"
MINEMACS_LOAD_ALL_MODULES=1
make ci | tee /tmp/minemacs-output
EMACS_EXIT_CODE=$?
if [[ "$EMACS_EXIT_CODE" == 0 ]]; then
echo "Emacs exited successfully"
else
echo "Emacs exited with non-zero code ${EMACS_EXIT_CODE}"
fi
WARNINGS=$(cat /tmp/minemacs-output | grep Warning | sed -E 's/^(.*\.el): Warning/- \*\*\1\*\*/' | sed -E 's/^Warning ([^:]*)/- \*\*\1\*\*/')
LOAD_ERRORS=$(cat /tmp/minemacs-output | grep -E "(Cannot (open )?load)|(Not found)" | sed 's/^/- /')
ELISP_ERRORS=$(cat /tmp/minemacs-output | awk -F': ' '/^Debugger entered--Lisp error: / { print "- **" $1 "**: `" $2 "`"; print "```elisp"; while (getline && match($0, "^[[:space:]]{2}")) print $0; print "```"}' )
echo -e "# Emacs $EMACS_VERSION - all modules report\n" >> $GITHUB_STEP_SUMMARY
if [[ ! -z "$LOAD_ERRORS" ]]; then
echo -e "## Loading errors\n$LOAD_ERRORS\n" >> $GITHUB_STEP_SUMMARY
fi
if [[ ! -z "$ELISP_ERRORS" ]]; then
echo -e "## Emacs Lisp errors\n$ELISP_ERRORS\n" >> $GITHUB_STEP_SUMMARY
fi
if [[ ! -z "$WARNINGS" ]]; then
echo -e "## Warnings\n$WARNINGS" >> $GITHUB_STEP_SUMMARY
fi
if [[ ! -z "$LOAD_ERRORS" ]] || [[ ! -z "$ELISP_ERRORS" ]] || [[ "$EMACS_EXIT_CODE" != 0 ]]; then exit 1; fi
- name: Running MinEmacs in daemon mode
run: |
echo "Loading Emacs in daemon mode"
MINEMACS_LOAD_ALL_MODULES=1
make ci-daemon | tee /tmp/minemacs-output
EMACS_EXIT_CODE=$?
if [[ "$EMACS_EXIT_CODE" == 0 ]]; then
echo "Emacs exited successfully"
else
echo "Emacs exited with non-zero code ${EMACS_EXIT_CODE}"
fi
WARNINGS=$(cat /tmp/minemacs-output | grep Warning | sed -E 's/^(.*\.el): Warning/- \*\*\1\*\*/' | sed -E 's/^Warning ([^:]*)/- \*\*\1\*\*/')
LOAD_ERRORS=$(cat /tmp/minemacs-output | grep -E "(Cannot (open )?load)|(Not found)" | sed 's/^/- /')
ELISP_ERRORS=$(cat /tmp/minemacs-output | awk -F': ' '/^Debugger entered--Lisp error: / { print "- **" $1 "**: `" $2 "`"; print "```elisp"; while (getline && match($0, "^[[:space:]]{2}")) print $0; print "```"}' )
echo -e "# Emacs $EMACS_VERSION - daemon mode report\n" >> $GITHUB_STEP_SUMMARY
if [[ ! -z "$LOAD_ERRORS" ]]; then
echo -e "## Loading errors\n$LOAD_ERRORS\n" >> $GITHUB_STEP_SUMMARY
fi
if [[ ! -z "$ELISP_ERRORS" ]]; then
echo -e "## Emacs Lisp errors\n$ELISP_ERRORS\n" >> $GITHUB_STEP_SUMMARY
fi
if [[ ! -z "$WARNINGS" ]]; then
echo -e "## Warnings\n$WARNINGS" >> $GITHUB_STEP_SUMMARY
fi