Skip to content

Commit

Permalink
test: Introduce XS CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kriskowal committed Sep 20, 2024
1 parent c101168 commit 713abb1
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,52 @@ jobs:
# when imported in an NPM node_modules tree.
- name: Prepack packages
run: yarn lerna run --reject-cycles --concurrency 1 prepack

test-xs:
name: test-xs

# begin macro

runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
node-version: [20.x]
xs-version: [5.0.0]
platform: [ubuntu-latest]

steps:
- name: Checkout
uses: actions/checkout@v3

# without this, setup-node errors on mismatched yarn versions
- run: corepack enable

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: yarn

- name: Install dependencies
run: yarn install --immutable

# end macro

- name: Run yarn build
run: yarn build

- name: Clone XS
run: git clone https://github.com/moddable-OpenSource/moddable --branch "${{ matrix.xs-version }}" --depth 1

- name: Build XS
working-directory: moddable/xs/makefiles/lin
run: make debug MODDABLE=$GITHUB_WORKSPACE/moddable CC='cc "-D__has_builtin(x)=1"' # give the syntax highlighter a hand: '

- name: Is this thing on?
run: |
PATH=$PATH:$GITHUB_WORKSPACE/moddable/build/bin/lin/debug
xst -e true && ! xst -e null.reference
- name: Run XS tests
run: PATH=$PATH:$GITHUB_WORKSPACE/moddable/build/bin/lin/debug yarn lerna run test:xs

0 comments on commit 713abb1

Please sign in to comment.