diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b82bfcef1d..41308fe63e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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