Skip to content

Commit

Permalink
ci: add linux build+test workflow (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
bnoordhuis committed Oct 31, 2023
1 parent 2788d71 commit 2f7fd38
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,31 @@
name: ci

on:
pull_request:
paths:
- '**'
- '!LICENSE'
- '!TODO'
- '!doc/**'
- '!examples/**'
- '.github/workflows/ci.yml'
push:
branches:
- master

# TODO(bnoordhuis) run test262 tests
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: build
run: |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y
- name: stats
run: |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y qjs
./qjs -qd
- name: test
run: |
make -j$(getconf _NPROCESSORS_ONLN) CONFIG_WERROR=y test
8 changes: 8 additions & 0 deletions .gitignore
@@ -0,0 +1,8 @@
examples/point.so
.obj/
qjs
qjs32
qjsc
qjscalc.c
repl.c
tests/bjson.so
3 changes: 2 additions & 1 deletion Makefile
Expand Up @@ -28,7 +28,8 @@ endif
# Windows cross compilation from Linux
#CONFIG_WIN32=y
# use link time optimization (smaller and faster executables but slower build)
CONFIG_LTO=y
# XXX(bnoordhuis) disabled because of slow build times
#CONFIG_LTO=y
# consider warnings as errors (for development)
#CONFIG_WERROR=y
# force 32 bit build for some utilities
Expand Down
3 changes: 2 additions & 1 deletion tests/test_std.js
Expand Up @@ -143,7 +143,8 @@ function test_os()
{
var fd, fpath, fname, fdir, buf, buf2, i, files, err, fdate, st, link_path;

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

fdir = "test_tmp_dir";
fname = "tmp_file.txt";
Expand Down

0 comments on commit 2f7fd38

Please sign in to comment.