diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 4a2b8110..8c34e824 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -64,7 +64,7 @@ jobs: env: RUST_MIN_STACK: 16777216 - build: + build-wasm: runs-on: ubuntu-latest needs: [test, lint, format] @@ -80,3 +80,20 @@ jobs: - name: Check build artifacts run: pnpm run --filter @stylexswc/swc-plugin check:artifacts + + build-rs: + runs-on: ubuntu-latest + needs: [test, lint, format] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup environment + uses: ./.github/actions/setup + + - name: Build project + run: pnpm run --filter @stylexswc/rs-compiler build + + - name: Check build artifacts + run: pnpm run --filter @stylexswc/rs-compiler check:artifacts diff --git a/crates/stylex-rs-compiler/package.json b/crates/stylex-rs-compiler/package.json index f1b9a84c..d2649f38 100644 --- a/crates/stylex-rs-compiler/package.json +++ b/crates/stylex-rs-compiler/package.json @@ -79,6 +79,7 @@ "bench": "node --import @swc-node/register/esm-register benchmark/bench.ts", "build": "napi build --platform --release dist", "build:debug": "napi build --platform", + "check:artifacts": "[ -f ./dist/rs-compiler.*.node ] || { echo 'Artifacts does not exist'; exit 1; }", "format": "run-p format:prettier format:rs format:toml", "format:prettier": "prettier . -w", "format:rs": "cargo fmt",