branch: externals/csharp-mode commit 4a5114abe76b1e3859fcfe0f5b35b53f57343d47 Merge: 8b98e8e 331b9d7 Author: Jostein Kjønigsen <jost...@kjonigsen.net> Commit: GitHub <nore...@github.com>
Merge pull request #247 from jcs-PR/ci Use GitHub actions CI --- .github/workflows/build.yml | 46 +++++++++++++++++++++++++++++++++++++-------- makefile | 14 +++++++------- 2 files changed, 45 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f0314a5..c8f16d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,30 +9,60 @@ on: workflow_dispatch: jobs: - build: - runs-on: ubuntu-18.04 - name: Emacs - ${{ matrix.emacs }} + unix-build: + runs-on: ${{ matrix.os }} strategy: matrix: - emacs: [26.1, 26.2, 26.3, 27.1, snapshot] + os: [ubuntu-latest, macos-latest] + emacs: [26.1, 26.2, 26.3, 27.1, 27.2, snapshot] steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.6" + architecture: "x64" + - uses: purcell/setup-emacs@master with: version: ${{ matrix.emacs }} + - uses: conao3/setup-cask@master + with: + version: 0.8.4 + - name: paths run: | echo "$HOME/.cask/bin" >> $GITHUB_PATH - - name: Install cask + - name: Run a multi-line script run: | - git clone https://github.com/cask/cask ~/.cask - PATH=$HOME/.cask/bin:$PATH - cask + emacs --version + make test + + windows-build: + runs-on: windows-latest + strategy: + matrix: + emacs: [26.1, 26.2, 26.3, 27.1, 27.2, snapshot] + + steps: + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.6" + architecture: "x64" + + - uses: jcs090218/setup-emacs-windows@master + with: + version: ${{ matrix.emacs }} + + - uses: conao3/setup-cask@master + with: + version: 0.8.4 - name: Run a multi-line script run: | diff --git a/makefile b/makefile index 2705aca..7e1a249 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,6 @@ -EMACS="$(shell which emacs)" -EMACS_CLI=$(EMACS) -Q -batch -L . -CASK=~/.cask/bin/cask +EMACS ?= emacs +CASK ?= cask + TESTHOME=/tmp/emacs package: build @@ -9,9 +9,10 @@ package: build build: test $(CASK) build -test: *.el - mkdir -p $(TESTHOME) - + HOME=$(TESTHOME) $(EMACS_CLI) -l csharp-mode-tests.el -f ert-run-tests-batch-and-exit +test: + @echo "Testing..." + @$(CASK) $(EMACS) -Q -batch + -L . -l csharp-mode-tests.el -f ert-run-tests-batch-and-exit clean: $(CASK) clean-elc @@ -22,4 +23,3 @@ check-defuns: grep "^(defun " csharp-mode.el | sed -r "s/\(defun ([a-z0-9-]+) .*$$/\1/" | sort >/tmp/defuns.txt for line in `cat /tmp/defuns.txt` ; do echo -n "$$line: " ; grep "$$line" csharp-mode.el | grep -v defun | wc -l ; done >/tmp/use-count.txt grep " 0" /tmp/use-count.txt -