Skip to content

Commit ff41561

Browse files
committed
build-release github workflow for headless linux SDK
1 parent 8d81d24 commit ff41561

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: build and release moddable SDK for linux CLI (x-cli-lin)
2+
3+
on: [push]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v1
12+
- name: build moddable headless tools
13+
run: |
14+
# ISSUE: move this to a makefile stanza?
15+
export MODDABLE=$PWD
16+
export XS_DIR=$MODDABLE/xs
17+
cd $MODDABLE/build/makefiles/lin
18+
# debug
19+
# ISSUE: why are debug tools needed?
20+
make -f $XS_DIR/makefiles/lin/xsc.mk
21+
make -f $XS_DIR/makefiles/lin/xsid.mk
22+
make -f $XS_DIR/makefiles/lin/xsl.mk
23+
make -f tools.mk
24+
# release
25+
make GOAL=release -f $XS_DIR/makefiles/lin/xsc.mk
26+
make GOAL=release -f $XS_DIR/makefiles/lin/xsid.mk
27+
make GOAL=release -f $XS_DIR/makefiles/lin/xsl.mk
28+
make GOAL=release -f tools.mk
29+
- name: check that helloworld builds
30+
run: |
31+
export MODDABLE=$PWD
32+
export PATH=$MODDABLE/build/bin/lin/release:$PATH
33+
cd $MODDABLE/examples/helloworld
34+
mcconfig -m -p x-cli-lin
35+
# ISSUE: support scripts with no main()?
36+
# $MODDABLE/build/bin/lin/release/helloworld
37+
test -x $MODDABLE/build/bin/lin/release/helloworld
38+
mcconfig -d -m -p x-cli-lin
39+
test -x $MODDABLE/build/bin/lin/debug/helloworld
40+
- name: archive linux SDK
41+
if: startsWith(github.ref, 'refs/tags/')
42+
run: |
43+
cd ..
44+
tar czf moddable-linux-sdk.tgz moddable/
45+
mv moddable-linux-sdk.tgz moddable/
46+
- name: Release
47+
uses: softprops/action-gh-release@v1
48+
if: startsWith(github.ref, 'refs/tags/')
49+
with:
50+
files: moddable-linux-sdk.tgz
51+
env:
52+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)