branch: elpa/flamegraph
commit b0fa2e4b5451dd8c40d99af353b601a7077423ca
Author: Dmitry Gutov <[email protected]>
Commit: Dmitry Gutov <[email protected]>

    Add CI stuff
---
 .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++
 Makefile                 | 21 +++++++++++++++++++++
 2 files changed, 48 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000000..2cd60bc256
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,27 @@
+name: CI
+
+on:
+  push:
+    branches: [main]
+  pull_request:
+
+jobs:
+  test:
+    runs-on: ubuntu-latest
+    strategy:
+      fail-fast: false
+      matrix:
+        emacs_version:
+          - '30.1'
+          - snapshot
+    steps:
+      - uses: actions/checkout@v4
+      - uses: purcell/setup-emacs@master
+        with:
+          version: ${{ matrix.emacs_version }}
+
+      - name: Byte-compile (warnings → errors)
+        run: make compile
+
+      - name: Run ERT suite
+        run: make test
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000000..43d5064f0e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,21 @@
+EMACS ?= emacs
+
+EL  := flamegraph.el test/flamegraph-tests.el
+ELC := $(EL:.el=.elc)
+
+.PHONY: check compile test clean
+
+check: compile test
+
+compile:
+       $(EMACS) -Q -batch -L . \
+         --eval "(setq byte-compile-error-on-warn t)" \
+         -f batch-byte-compile $(EL)
+
+test:
+       $(EMACS) -Q -batch -L . \
+         -l test/flamegraph-tests.el \
+         -f ert-run-tests-batch-and-exit
+
+clean:
+       rm -f $(ELC)

Reply via email to