Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove ERT and "package" installation in CI #2906

Merged
merged 2 commits into from
Jun 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,9 @@ jobs:
env
emacs --version

- name: Install prereqs
run: |
source test/github-actions.sh
prereqs

- name: Compilation
run: |
source test/github-actions.sh
byte-compile pkg/*.el
byte-compile -Werror *.el methods/*.el

- name: Test
Expand Down
23 changes: 3 additions & 20 deletions test/github-actions.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,10 @@
# source me
# Define the following functions here to keep .github/workflows/test.yml nice and tidy
# - prereqs()
# - byte-compile()
# - check-recipes()
# - check-whitespace()
# - ert-tests()

# Installs ert and package.el as needed.
prereqs() {
# Put external elisp into pkg/.
(mkdir -p pkg && cd pkg
if ! emacs -Q --batch --eval "(require 'ert)" ; then
ert_compat=https://raw.githubusercontent.com/ohler/ert/c619b56c5bc6a866e33787489545b87d79973205
curl -LO $ert_compat/lisp/emacs-lisp/ert.el \
-O $ert_compat/lisp/emacs-lisp/ert-x.el
fi
if ! emacs -Q --batch --eval "(require 'package)" ; then
pkg_compat23=https://raw.githubusercontent.com/mirrors/emacs/ba08b24186711eaeb3748f3d1f23e2c2d9ed0d09
curl -LO $pkg_compat23/lisp/emacs-lisp/package.el \
-O $pkg_compat23/lisp/emacs-lisp/package-x.el
fi)
}

BASE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.pull_request.base.sha')
if [ "$BASE" = 'null' ]; then
BASE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.before')
Expand Down Expand Up @@ -70,7 +53,7 @@ else
fi

ert-tests() {
emacs -batch -Q $EMACS_OPT -L pkg/ -L . -l test/el-get-tests.el -f ert-run-tests-batch-and-exit
emacs -batch -Q $EMACS_OPT -L . -l test/el-get-tests.el -f ert-run-tests-batch-and-exit
}

# byte-compile [-Werror] <files>...
Expand All @@ -80,12 +63,12 @@ byte-compile() {
error_on_warning=t
shift
fi
emacs -Q -L pkg/ -L . -L methods/ -batch \
emacs -Q -L . -L methods/ -batch \
--eval "(setq byte-compile-error-on-warn $error_on_warning)" \
-f batch-byte-compile "$@"
}

shopt -s nullglob

# show definitions for log
declare -f prereqs byte-compile ert-tests check-recipes check-whitespace
declare -f byte-compile ert-tests check-recipes check-whitespace
Loading