Skip to content

Commit

Permalink
chore: add back lerna (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn authored Jul 23, 2024
1 parent 5e0d4ab commit d668db1
Show file tree
Hide file tree
Showing 3 changed files with 3,700 additions and 35 deletions.
61 changes: 42 additions & 19 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,28 @@ jobs:
- name: Toml
run: pnpm taplo fmt --check

build-cli:
name: Build CLI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm --filter="@oxc-node/cli" build
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: cli
path: ./packages/cli/dist

build:
strategy:
fail-fast: false
Expand Down Expand Up @@ -205,8 +227,6 @@ jobs:
sudo corepack enable
pnpm install
pnpm --filter=@oxc-node/core build --target x86_64-unknown-freebsd
pnpm --filter="@oxc-node/cli" build
pnpm --filter="\!integrate-ava" run test
rm -rf node_modules
rm -rf target
- name: Upload artifact
Expand All @@ -220,6 +240,7 @@ jobs:
name: Test bindings on ${{ matrix.settings.target }} - node@${{ matrix.node }} - transform all@${{ matrix.transform_all }}
needs:
- build
- build-cli
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -250,6 +271,10 @@ jobs:
node-version: ${{ matrix.node }}
cache: pnpm
architecture: ${{ matrix.settings.architecture }}
- uses: actions/download-artifact@v4
with:
name: cli
path: ./packages/cli/dist
- name: Install dependencies
run: pnpm install
- name: Download artifacts
Expand All @@ -260,10 +285,6 @@ jobs:
- name: List packages
run: ls -R .
shell: bash
- name: Build cli
run: pnpm --filter="@oxc-node/cli" build
- name: Rebuild
run: pnpm rb
- name: Test bindings
run: pnpm test
env:
Expand All @@ -272,6 +293,7 @@ jobs:
name: Test ${{ matrix.target }} - node@${{ matrix.node }}
needs:
- build
- build-cli
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -323,6 +345,10 @@ jobs:
}
" >> $GITHUB_OUTPUT
echo "PNPM_STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
- uses: actions/download-artifact@v4
with:
name: cli
path: ./packages/cli/dist
# use --force to download the all platform/arch dependencies
- name: Install dependencies
run: pnpm install --force
Expand All @@ -334,8 +360,6 @@ jobs:
- name: List packages
run: ls -R .
shell: bash
- name: Build cli
run: pnpm --filter="@oxc-node/cli" build
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
Expand All @@ -346,15 +370,12 @@ jobs:
with:
image: ${{ steps.docker.outputs.IMAGE }}
options: -v ${{ steps.docker.outputs.PNPM_STORE_PATH }}:${{ steps.docker.outputs.PNPM_STORE_PATH }} -v ${{ github.workspace }}:${{ github.workspace }} -w ${{ github.workspace }} --platform ${{ steps.docker.outputs.PLATFORM }}
run: >-
corepack enable &&
pnpm config set store-dir ${{ steps.docker.outputs.PNPM_STORE_PATH }} --global &&
pnpm rb &&
pnpm test
run: corepack enable && pnpm test
test-wasi:
name: Test WASI target
needs:
- build
- build-cli
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -365,6 +386,10 @@ jobs:
with:
node-version: 20
cache: pnpm
- uses: actions/download-artifact@v4
with:
name: cli
path: ./packages/cli/dist
- name: Install dependencies
run: pnpm install --force
- name: Download artifacts
Expand All @@ -375,10 +400,6 @@ jobs:
- name: List packages
run: ls -R .
shell: bash
- name: Build cli
run: pnpm --filter="@oxc-node/cli" build
- name: Rebuild
run: pnpm rb
- name: Test bindings
run: pnpm test
env:
Expand Down Expand Up @@ -414,8 +435,10 @@ jobs:
- name: List packages
run: ls -R ./npm
shell: bash
- name: Build cli
run: pnpm --filter="@oxc-node/cli" build
- uses: actions/download-artifact@v4
with:
name: cli
path: ./packages/cli/dist
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"cross-env": "^7.0.3",
"emnapi": "^1.2.0",
"husky": "^9.0.11",
"lerna": "^8.1.7",
"lint-staged": "^15.2.7",
"npm-run-all2": "^6.2.2",
"oxlint": "^0.5.2",
Expand Down
Loading

0 comments on commit d668db1

Please sign in to comment.