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 004dd04
Showing 1 changed file with 103 additions and 0 deletions.
103 changes: 103 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -260,3 +260,106 @@ 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: Get XS
run: |
wget https://github.com/Moddable-OpenSource/moddable/releases/download/${{ matrix.xs-version }}/xst-lin64.zip
mkdir -p bin
unzip xst-lin64.zip -d bin
chmod 755 bin/xst
- name: Is this thing on?
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
xst -e true && ! xst -e null.reference
- name: Run XS tests
run: |
PATH=$PATH:$GITHUB_WORKSPACE/bin
yarn lerna run test:xs
# for testing a version with a particular hash, when pre-built binaries are unavailable
# make-and-test-xs:
# name: make-and-test-xs

# # begin macro

# runs-on: ${{ matrix.platform }}
# strategy:
# fail-fast: false
# matrix:
# xs-version: []
# node-version: [20.x]
# 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 004dd04

Please sign in to comment.