Remove ERT and "package" installation in CI (#2906)

* Remove ERT and "package" installation in CI

Since Emacs 23 is dropped for quite some time now, remove installation
of ERT and "package", because they are built-in since Emacs 24.

* Remove "prereqs" function left-overs
This commit is contained in:
stephan-cr 2023-06-19 11:38:53 +02:00 committed by GitHub
parent cd99807894
commit 887bedb495
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 26 deletions

View File

@ -39,15 +39,9 @@ jobs:
env env
emacs --version emacs --version
- name: Install prereqs
run: |
source test/github-actions.sh
prereqs
- name: Compilation - name: Compilation
run: | run: |
source test/github-actions.sh source test/github-actions.sh
byte-compile pkg/*.el
byte-compile -Werror *.el methods/*.el byte-compile -Werror *.el methods/*.el
- name: Test - name: Test

View File

@ -1,27 +1,10 @@
# source me # source me
# Define the following functions here to keep .github/workflows/test.yml nice and tidy # Define the following functions here to keep .github/workflows/test.yml nice and tidy
# - prereqs()
# - byte-compile() # - byte-compile()
# - check-recipes() # - check-recipes()
# - check-whitespace() # - check-whitespace()
# - ert-tests() # - 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') BASE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.pull_request.base.sha')
if [ "$BASE" = 'null' ]; then if [ "$BASE" = 'null' ]; then
BASE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.before') BASE=$(cat "$GITHUB_EVENT_PATH" | jq -r '.before')
@ -70,7 +53,7 @@ else
fi fi
ert-tests() { 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>... # byte-compile [-Werror] <files>...
@ -80,7 +63,7 @@ byte-compile() {
error_on_warning=t error_on_warning=t
shift shift
fi 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)" \ --eval "(setq byte-compile-error-on-warn $error_on_warning)" \
-f batch-byte-compile "$@" -f batch-byte-compile "$@"
} }
@ -88,4 +71,4 @@ byte-compile() {
shopt -s nullglob shopt -s nullglob
# show definitions for log # 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