Skip to content

Commit 2f7fd38

Browse files
authored
ci: add linux build+test workflow (#2)
1 parent 2788d71 commit 2f7fd38

File tree

4 files changed

+43
-2
lines changed

4 files changed

+43
-2
lines changed

.github/workflows/ci.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: ci
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- '**'
7+
- '!LICENSE'
8+
- '!TODO'
9+
- '!doc/**'
10+
- '!examples/**'
11+
- '.github/workflows/ci.yml'
12+
push:
13+
branches:
14+
- master
15+
16+
# TODO(bnoordhuis) run test262 tests
17+
jobs:
18+
linux:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- name: build
23+
run: |
24+
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y
25+
- name: stats
26+
run: |
27+
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y qjs
28+
./qjs -qd
29+
- name: test
30+
run: |
31+
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y test

.gitignore

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
examples/point.so
2+
.obj/
3+
qjs
4+
qjs32
5+
qjsc
6+
qjscalc.c
7+
repl.c
8+
tests/bjson.so

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ endif
2828
# Windows cross compilation from Linux
2929
#CONFIG_WIN32=y
3030
# use link time optimization (smaller and faster executables but slower build)
31-
CONFIG_LTO=y
31+
# XXX(bnoordhuis) disabled because of slow build times
32+
#CONFIG_LTO=y
3233
# consider warnings as errors (for development)
3334
#CONFIG_WERROR=y
3435
# force 32 bit build for some utilities

tests/test_std.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ function test_os()
143143
{
144144
var fd, fpath, fname, fdir, buf, buf2, i, files, err, fdate, st, link_path;
145145

146-
assert(os.isatty(0));
146+
// XXX(bnoordhuis) disabled because stdio is not a tty on CI
147+
//assert(os.isatty(0));
147148

148149
fdir = "test_tmp_dir";
149150
fname = "tmp_file.txt";

0 commit comments

Comments
 (0)