try CI on tangled.org
This commit is contained in:
17
.tangled/workflows/build.yml
Normal file
17
.tangled/workflows/build.yml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
when:
|
||||||
|
- event: ["push", "manual"]
|
||||||
|
branch: ["main"]
|
||||||
|
engine: "nixery"
|
||||||
|
dependencies:
|
||||||
|
nixpkgs:
|
||||||
|
- nodejs
|
||||||
|
- gnumake
|
||||||
|
- diffutils
|
||||||
|
- findutils
|
||||||
|
- git
|
||||||
|
- time
|
||||||
|
steps:
|
||||||
|
- name: "build newt"
|
||||||
|
command: "make newt3.js"
|
||||||
|
- name: "test"
|
||||||
|
command: "make test"
|
||||||
5
Makefile
5
Makefile
@@ -9,11 +9,8 @@ RUNJS=node
|
|||||||
all: newt.js
|
all: newt.js
|
||||||
|
|
||||||
|
|
||||||
REV=$(shell git rev-parse --short HEAD)
|
|
||||||
src/Revision.newt: .PHONY
|
src/Revision.newt: .PHONY
|
||||||
echo "module Revision\nimport Prelude\ngitRevision : String\ngitRevision = \"${REV}\"" > src/Revision.newt.new
|
sh ./scripts/mkrevision
|
||||||
cmp src/Revision.newt.new src/Revision.newt || cp src/Revision.newt.new src/Revision.newt
|
|
||||||
rm -f src/Revision.newt.new
|
|
||||||
|
|
||||||
newt.js: ${SRCS} src/Revision.newt
|
newt.js: ${SRCS} src/Revision.newt
|
||||||
$(RUNJS) bootstrap/newt.js src/Main.newt -o newt.js
|
$(RUNJS) bootstrap/newt.js src/Main.newt -o newt.js
|
||||||
|
|||||||
12
scripts/mkrevision
Executable file
12
scripts/mkrevision
Executable file
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/sh -e
|
||||||
|
REV=$(git rev-parse --short HEAD)
|
||||||
|
cat >> src/Revision.newt.new <<EOF
|
||||||
|
module Revision
|
||||||
|
|
||||||
|
import Prelude
|
||||||
|
|
||||||
|
gitRevision : String
|
||||||
|
gitRevision = "$REV"
|
||||||
|
EOF
|
||||||
|
cmp src/Revision.newt.new src/Revision.newt || cp src/Revision.newt.new src/Revision.newt
|
||||||
|
rm -f src/Revision.newt.new
|
||||||
Reference in New Issue
Block a user