Skip to content

Commit 7698f9b

Browse files
authored
Use Eask for CI (emacs-lsp#700)
1 parent 769a129 commit 7698f9b

File tree

6 files changed

+56
-133
lines changed

6 files changed

+56
-133
lines changed

.github/workflows/test.yml

+18-35
Original file line numberDiff line numberDiff line change
@@ -9,32 +9,37 @@ on:
99
- master
1010

1111
jobs:
12-
unix-test:
12+
test:
1313
runs-on: ${{ matrix.os }}
1414
strategy:
15+
fail-fast: false
1516
matrix:
16-
os: [ubuntu-latest, macos-latest]
17-
emacs_version:
17+
os: [ubuntu-latest, macos-latest, windows-latest]
18+
emacs-version:
1819
- 26.3
1920
- 27.1
2021
- 27.2
22+
- 28.1
2123
- snapshot
2224

2325
steps:
24-
- uses: actions/checkout@v2
26+
- uses: purcell/setup-emacs@master
27+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
28+
with:
29+
version: ${{ matrix.emacs-version }}
2530

26-
- uses: actions/setup-python@v2
31+
- uses: jcs090218/setup-emacs-windows@master
32+
if: matrix.os == 'windows-latest'
2733
with:
28-
python-version: '3.6'
29-
architecture: 'x64'
34+
version: ${{ matrix.emacs-version }}
3035

31-
- uses: purcell/setup-emacs@master
36+
- uses: actions/setup-node@v2
3237
with:
33-
version: ${{ matrix.emacs_version }}
38+
node-version: '14'
3439

35-
- uses: conao3/setup-cask@master
40+
- uses: emacs-eask/setup-eask@master
3641
with:
37-
version: 0.8.4
42+
version: '0.4.17'
3843

3944
- name: Install Rust toolchain
4045
uses: actions-rs/toolchain@v1
@@ -45,37 +50,15 @@ jobs:
4550
components: rust-src
4651

4752
- name: Install Rust Analyzer
53+
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
4854
env:
4955
RUST_ANALYZER_VERSION: 2020-04-20
5056
run: |
5157
mkdir -p $HOME/bin
5258
wget https://github.com/rust-analyzer/rust-analyzer/releases/download/$RUST_ANALYZER_VERSION/rust-analyzer-linux -O $HOME/bin/rust-analyzer
5359
chmod +x $HOME/bin/rust-analyzer
5460
55-
- name: Run tests
56-
run: 'make unix-ci'
57-
58-
windows-test:
59-
runs-on: windows-latest
60-
strategy:
61-
matrix:
62-
emacs-version:
63-
- 26.3
64-
- 27.1
65-
- 27.2
66-
- snapshot
67-
68-
steps:
6961
- uses: actions/checkout@v2
7062

71-
- uses: actions/setup-python@v2
72-
with:
73-
python-version: '3.6'
74-
architecture: 'x64'
75-
76-
- uses: jcs090218/setup-emacs-windows@master
77-
with:
78-
version: ${{ matrix.emacs-version }}
79-
8063
- name: Run tests
81-
run: 'make windows-ci'
64+
run: 'make ci'

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
.cask/
1+
.eask/
22
*.elc

Cask

-12
This file was deleted.

Eask

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
(package "lsp-ui"
2+
"8.0.0"
3+
"UI integrations for lsp-mode")
4+
5+
(package-file "lsp-ui.el")
6+
7+
(files "*.el" "lsp-ui-doc.html")
8+
9+
(source "gnu")
10+
(source "melpa")
11+
12+
(depends-on "emacs" "26.3")
13+
(depends-on "dash")
14+
(depends-on "flycheck")
15+
(depends-on "lsp-mode")
16+
(depends-on "markdown-mode")
17+
(depends-on "rustic")
18+
19+
(development
20+
(depends-on "ert-runner"))
21+
22+
(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432

Makefile

+15-40
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,31 @@
11
SHELL := /usr/bin/env bash
22

33
EMACS ?= emacs
4-
CASK ?= cask
4+
EASK ?= eask
55

66
TEST-FILES := test/windows-bootstrap.el test/test-helper.el \
77
$(shell ls test/lsp-ui-*.el)
88
LOAD-FILE = -l $(test-file)
99
LOAD-TEST-FILES := $(foreach test-file, $(TEST-FILES), $(LOAD-FILE))
1010

11-
build:
12-
EMACS=$(EMACS) cask install
13-
EMACS=$(EMACS) cask build
14-
EMACS=$(EMACS) cask clean-elc
15-
16-
# FIXME: Add `unix-test`
17-
unix-ci: build unix-compile clean
11+
# FIXME: add `test`
12+
ci: build compile clean
1813

19-
# FIXME: Add `windows-test`
20-
windows-ci: CASK=
21-
windows-ci: windows-compile clean
14+
build:
15+
$(EASK) package
16+
$(EASK) install
17+
$(EASK) clean-elc
2218

23-
unix-compile:
19+
compile:
2420
@echo "Compiling..."
25-
@$(CASK) $(EMACS) -Q --batch \
26-
-L . \
27-
--eval '(setq byte-compile-error-on-warn t)' \
28-
-f batch-byte-compile \
29-
*.el
21+
@$(EASK) compile
3022

31-
windows-compile:
32-
@echo "Compiling..."
33-
@$(CASK) $(EMACS) -Q --batch \
34-
--eval '(setq emacs-lsp-ci t)' \
35-
-l test/windows-bootstrap.el \
36-
-L . \
37-
--eval '(setq byte-compile-error-on-warn t)' \
38-
-f batch-byte-compile \
39-
*.el
40-
41-
unix-test:
42-
EMACS=$(EMACS) cask exec ert-runner
43-
44-
windows-test:
45-
@$(EMACS) -Q --batch \
46-
--eval '(setq emacs-lsp-ci t)' \
47-
-l test/windows-bootstrap.el \
48-
-L . \
49-
$(LOAD-TEST-FILES) \
50-
--eval "(ert-run-tests-batch-and-exit \
51-
'(and (not (tag no-win)) (not (tag org))))"
23+
test:
24+
@echo "Testing..."
25+
$(EASK) install-deps --dev
26+
$(EASK) exec ert-runner -L . $(LOAD-TEST-FILES) -t '!no-win' -t '!org'
5227

5328
clean:
54-
rm -rf .cask *.elc
29+
@$(EASK) clean-all
5530

56-
.PHONY: build ci unix-compile unix-test windows-compile windows-test clean
31+
.PHONY: ci build compile test clean

test/windows-bootstrap.el

-45
This file was deleted.

0 commit comments

Comments
 (0)