-
Notifications
You must be signed in to change notification settings - Fork 138
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
157 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
# * test.yml --- Test libvterm using makem.sh on GitHub Actions | ||
|
||
# Based on Alphapapa's makem.sh | ||
# https://github.com/alphapapa/makem.sh | ||
|
||
# Based on Steve Purcell's examples at | ||
# <https://github.com/purcell/setup-emacs/blob/master/.github/workflows/test.yml>, | ||
# <https://github.com/purcell/package-lint/blob/master/.github/workflows/test.yml>. | ||
|
||
# * License: | ||
|
||
# This program is free software; you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
|
||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
|
||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
|
||
# * Code: | ||
|
||
name: "CI" | ||
on: | ||
pull_request: | ||
push: | ||
# Comment out this section to enable testing of all branches. | ||
# branches: | ||
# - master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
emacs_version: | ||
- snapshot | ||
use_system_libvterm: | ||
- no | ||
- yes | ||
steps: | ||
- uses: purcell/setup-emacs@master | ||
with: | ||
version: ${{ matrix.emacs_version }} | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Grab makem.sh | ||
uses: wei/wget@v1 | ||
with: | ||
args: https://raw.githubusercontent.com/alphapapa/makem.sh/master/makem.sh | ||
|
||
- name: Initialize sandbox | ||
run: | | ||
SANDBOX_DIR=$(mktemp -d) || exit 1 | ||
echo "{SANDBOX_DIR}={$SANDBOX_DIR}" >> $GITHUB_ENV | ||
bash makem.sh -vv --sandbox=$SANDBOX_DIR --install-deps --install-linters | ||
# - name: Install CMake | ||
# run: nix-env -f "<nixpkgs>" -iA cmake | ||
|
||
# - name: Install libvterm | ||
# if: ${{matrix.use_system_libvterm == 'yes'}} | ||
# run: nix-env -f "<nixpkgs>" -iA libvterm-neovim | ||
|
||
# - name: Install other dependencies | ||
# run: nix-env -f "<nixpkgs>" -iA libtool | ||
|
||
# - name: Install spell-checker | ||
# run: | | ||
# nix-env -f "<nixpkgs>" -iA hunspell | ||
# nix-env -f "<nixpkgs>" -iA hunspellDicts.en_US | ||
|
||
- name: Compile vterm | ||
if: ${{matrix.use_system_libvterm == 'yes'}} | ||
run: nix-shell -p libvterm-neovim -p cmake -p libtool --run "mkdir build && cd build && cmake .. && make && ldd ../vterm-module.so" | ||
|
||
# run: | | ||
# mkdir build | ||
# cd build | ||
# cmake .. | ||
# make | ||
|
||
- name: Require vterm | ||
if: ${{matrix.use_system_libvterm == 'no'}} | ||
run: bash makem.sh -vv --sandbox=$SANDBOX batch -- --eval "(require 'vterm)" | ||
|
||
- name: Require vterm | ||
run: bash makem.sh -vv --sandbox=$SANDBOX batch -- --eval "(require 'vterm)" | ||
|
||
- name: Lint | ||
# We only need to lint once | ||
continue-on-error: true | ||
run: bash makem.sh -vv --sandbox=$SANDBOX_DIR --exclude makem-pre-test-conf.el lint | ||
|
||
# - name: Test | ||
# if: always() # Run test even if linting fails. | ||
# run: bash makem.sh -vv --sandbox=$SANDBOX_DIR test | ||
|
||
# Local Variables: | ||
# eval: (outline-minor-mode) | ||
# End: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
;;; makem-pre-test-conf.el --- Configuration for tests -*- lexical-binding: t; -*- | ||
;; | ||
;; Copyright (C) 2020 Gabriele Bozzola | ||
;; | ||
;; Author: Gabriele Bozzola <http://github/sbozzolo> | ||
;; Maintainer: Gabriele Bozzola <[email protected]> | ||
;; Created: July 25, 2020 | ||
;; Modified: July 25, 2020 | ||
;; Version: 0.0.1 | ||
;; Keywords: | ||
;; Package-Requires: ((emacs 25.1)) | ||
;; | ||
;; This file is not part of GNU Emacs. | ||
;; | ||
;;; Commentary: | ||
;; | ||
;; https://github.com/alphapapa/makem.sh/issues/24 | ||
;; | ||
;;; Code: | ||
|
||
(setq vterm-always-compile-module t) | ||
|
||
(provide 'a-makem-pre-test-conf) | ||
;;; makem-pre-test-conf.el ends here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters