Skip to content

Commit 5e5f8c1

Browse files
authored
CI on Ubuntu 22.04 and macOS 11
1 parent 6702887 commit 5e5f8c1

File tree

5 files changed

+61
-7
lines changed

5 files changed

+61
-7
lines changed

.github/workflows/ci-macos-11.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build on macOS 11
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
linuxbuild:
12+
runs-on: macos-11
13+
steps:
14+
- uses: xmake-io/github-action-setup-xmake@v1
15+
with:
16+
xmake-version: v2.8.5
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 1
20+
- name: config
21+
run: xmake config --yes -vD
22+
- name: build
23+
run: xmake build --yes -vD s7
24+
- name: test
25+
run: xmake run --yes -vD plus.scm

.github/workflows/ci-ubuntu-jammy.yml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build on Ubuntu 22.04
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow_dispatch:
9+
10+
jobs:
11+
linuxbuild:
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- uses: xmake-io/github-action-setup-xmake@v1
15+
with:
16+
xmake-version: v2.8.5
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 1
20+
- name: config
21+
run: xmake config --yes -vD
22+
- name: build
23+
run: xmake build --yes -vD s7
24+
- name: test
25+
run: xmake run --yes -vD plus.scm

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
.xmake/
22
build/
3+
.vscode/

xmake.lua

+10
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,13 @@ target("s7") do
2222
add_packages ("s7")
2323
add_files("repl.c")
2424
end
25+
26+
target("plus.scm") do
27+
if is_plat("linux", "macosx") then
28+
on_run(function (target)
29+
cmd = "$(buildir)/$(plat)/$(arch)/$(mode)/s7 " .. "tests/plus.scm"
30+
print("> " .. cmd)
31+
os.exec(cmd)
32+
end)
33+
end
34+
end

xmake/packages/s/s7/xmake.lua

-7
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ package("s7")
5151
end)
5252

5353
on_test(function(package)
54-
if not package:is_cross() then
55-
local file = os.tmpfile() .. ".scm"
56-
io.writefile(file, [[
57-
(display "Hello World!")
58-
]])
59-
os.vrunv("s7", {file})
60-
end
6154
assert(package:check_csnippets([[
6255
static s7_pointer old_add; /* the original "+" function for non-string cases */
6356
static s7_pointer old_string_append; /* same, for "string-append" */

0 commit comments

Comments
 (0)