-
-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
198 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ name: E2E Tests | |
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- refactor/node | ||
|
||
jobs: | ||
call-rust-build: | ||
|
@@ -101,42 +101,42 @@ jobs: | |
# - name: Changesets Check | ||
# run: npx changeset status --since=origin/main | ||
|
||
ts-test: | ||
name: Typescript Test | ||
runs-on: ${{ matrix.settings.os }} | ||
needs: call-rust-build | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
settings: | ||
- os: ubuntu-latest | ||
abi: linux-x64-gnu | ||
- os: ubuntu-20.04 | ||
abi: linux-x64-gnu | ||
- os: macos-13 | ||
abi: darwin-x64 | ||
- os: macos-latest | ||
abi: darwin-arm64 | ||
- os: windows-latest | ||
abi: win32-x64-msvc | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install Dependencies | ||
run: npm install -g [email protected] && pnpm i --frozen-lockfile | ||
- name: Build CLI and Core | ||
run: pnpm --filter @farmfe/cli run build | ||
- uses: actions/download-artifact@v4 | ||
id: download | ||
with: | ||
name: ${{ github.sha }}-${{ matrix.settings.abi }} | ||
path: ./packages/core/binding | ||
- name: Build Core CJS | ||
run: cd packages/core && pnpm run build:cjs | ||
- name: Test - ${{ matrix.settings.abi }} | ||
run: npm run test | ||
# ts-test: | ||
# name: Typescript Test | ||
# runs-on: ${{ matrix.settings.os }} | ||
# needs: call-rust-build | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# settings: | ||
# - os: ubuntu-latest | ||
# abi: linux-x64-gnu | ||
# - os: ubuntu-20.04 | ||
# abi: linux-x64-gnu | ||
# - os: macos-13 | ||
# abi: darwin-x64 | ||
# - os: macos-latest | ||
# abi: darwin-arm64 | ||
# - os: windows-latest | ||
# abi: win32-x64-msvc | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 18 | ||
# - name: Install Dependencies | ||
# run: npm install -g [email protected] && pnpm i --frozen-lockfile | ||
# - name: Build CLI and Core | ||
# run: pnpm --filter @farmfe/cli run build | ||
# - uses: actions/download-artifact@v4 | ||
# id: download | ||
# with: | ||
# name: ${{ github.sha }}-${{ matrix.settings.abi }} | ||
# path: ./packages/core/binding | ||
# - name: Build Core CJS | ||
# run: cd packages/core && pnpm run build:cjs | ||
# - name: Test - ${{ matrix.settings.abi }} | ||
# run: npm run test | ||
# - name: Setup tmate session | ||
# if: ${{ failure() }} | ||
# uses: mxschmitt/action-tmate@v3 | ||
|
@@ -193,33 +193,101 @@ jobs: | |
test -f /tmp/artifacts/${{ github.sha }}-${abi}-${{ matrix.settings.name }}/index.farm | ||
done | ||
benchmarks: | ||
nightly-release: | ||
name: Nightly Release | ||
needs: [call-rust-build] | ||
runs-on: ${{ matrix.settings.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
settings: | ||
- os: ubuntu-latest | ||
abi: linux-x64-gnu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: "actions/checkout@v3" | ||
- uses: actions/setup-node@v3 | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
- name: Install Dependencies | ||
run: npm install -g [email protected] && pnpm i --frozen-lockfile | ||
- name: Build CLI and Core | ||
run: pnpm --filter @farmfe/cli run build | ||
node-version: 18.x | ||
|
||
# batch download artifacts | ||
- uses: actions/download-artifact@v4 | ||
id: download | ||
with: | ||
name: ${{ github.sha }}-${{ matrix.settings.abi }} | ||
path: ./packages/core/binding | ||
- name: Build Core CJS | ||
run: cd packages/core && pnpm run build:cjs | ||
- name: Run benchmarks | ||
uses: CodSpeedHQ/action@v3 | ||
path: /tmp/artifacts | ||
- name: Copy Farm Core Binary | ||
run: cp /tmp/artifacts/${{ github.sha }}-linux-x64-gnu/* ./packages/core/binding | ||
- name: Move Artifacts | ||
run: | | ||
for abi in linux-x64-gnu linux-x64-musl darwin-x64 win32-x64-msvc linux-arm64-musl linux-arm64-gnu darwin-arm64 win32-ia32-msvc win32-arm64-msvc | ||
do | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}/* ./packages/core/npm/${abi} | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-react/* ./rust-plugins/react/npm/${abi} | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-sass/* ./rust-plugins/sass/npm/${abi} | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi} | ||
test -f ./packages/core/npm/${abi}/farm.${abi}.node | ||
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node | ||
test -f ./rust-plugins/react/npm/${abi}/index.farm | ||
test -f ./rust-plugins/sass/npm/${abi}/index.farm | ||
done | ||
for abi in android-arm-eabi linux-arm-gnueabihf android-arm64 | ||
do | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi} | ||
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node | ||
done | ||
- name: Install Dependencies | ||
run: npm install -g [email protected] && pnpm i --frozen-lockfile | ||
- name: Build Plugin Tools | ||
run: pnpm --filter @farmfe/plugin-tools run build | ||
|
||
# - name: Set Nightly Version | ||
# run: | | ||
# NIGHTLY_VERSION="2.0.0-nightly.$(date +'%Y%m%d%H%M%S')" | ||
# pnpm version $NIGHTLY_VERSION --no-git-tag-version | ||
|
||
# - name: Publish Nightly to npm | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# run: | | ||
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
# pnpm publish --tag nightly --no-git-checks | ||
|
||
- name: Create Nightly Release Pull Request or Publish Nightly Version to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
run: npm exec vitest bench | ||
token: ${{ secrets.CODSPEED_TOKEN }} | ||
version: pnpm run bump:nightly | ||
publish: npm run release:nightly | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
# benchmarks: | ||
# needs: [call-rust-build] | ||
# runs-on: ${{ matrix.settings.os }} | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# settings: | ||
# - os: ubuntu-latest | ||
# abi: linux-x64-gnu | ||
# steps: | ||
# - uses: "actions/checkout@v3" | ||
# - uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 18 | ||
# - name: Install Dependencies | ||
# run: npm install -g [email protected] && pnpm i --frozen-lockfile | ||
# - name: Build CLI and Core | ||
# run: pnpm --filter @farmfe/cli run build | ||
# - uses: actions/download-artifact@v4 | ||
# id: download | ||
# with: | ||
# name: ${{ github.sha }}-${{ matrix.settings.abi }} | ||
# path: ./packages/core/binding | ||
# - name: Build Core CJS | ||
# run: cd packages/core && pnpm run build:cjs | ||
# - name: Run benchmarks | ||
# uses: CodSpeedHQ/action@v3 | ||
# with: | ||
# run: npm exec vitest bench | ||
# token: ${{ secrets.CODSPEED_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,78 @@ | ||
name: Nightly Release | ||
on: | ||
push: | ||
branches: | ||
- refactor/node | ||
# name: Nightly Release | ||
# on: | ||
# push: | ||
# branches: | ||
# - refactor/node | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
# concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
call-rust-build: | ||
uses: ./.github/workflows/rust-build.yaml | ||
# jobs: | ||
# call-rust-build: | ||
# uses: ./.github/workflows/rust-build.yaml | ||
|
||
nightly-release: | ||
name: Nightly Release | ||
needs: [call-rust-build] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repo | ||
uses: actions/checkout@v3 | ||
# nightly-release: | ||
# name: Nightly Release | ||
# needs: [call-rust-build] | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout Repo | ||
# uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js 18.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18.x | ||
# - name: Setup Node.js 18.x | ||
# uses: actions/setup-node@v3 | ||
# with: | ||
# node-version: 18.x | ||
|
||
# batch download artifacts | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: /tmp/artifacts | ||
- name: Copy Farm Core Binary | ||
run: cp /tmp/artifacts/${{ github.sha }}-linux-x64-gnu/* ./packages/core/binding | ||
- name: Move Artifacts | ||
run: | | ||
for abi in linux-x64-gnu linux-x64-musl darwin-x64 win32-x64-msvc linux-arm64-musl linux-arm64-gnu darwin-arm64 win32-ia32-msvc win32-arm64-msvc | ||
do | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}/* ./packages/core/npm/${abi} | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-react/* ./rust-plugins/react/npm/${abi} | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-sass/* ./rust-plugins/sass/npm/${abi} | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi} | ||
# # batch download artifacts | ||
# - uses: actions/download-artifact@v4 | ||
# with: | ||
# path: /tmp/artifacts | ||
# - name: Copy Farm Core Binary | ||
# run: cp /tmp/artifacts/${{ github.sha }}-linux-x64-gnu/* ./packages/core/binding | ||
# - name: Move Artifacts | ||
# run: | | ||
# for abi in linux-x64-gnu linux-x64-musl darwin-x64 win32-x64-msvc linux-arm64-musl linux-arm64-gnu darwin-arm64 win32-ia32-msvc win32-arm64-msvc | ||
# do | ||
# mv /tmp/artifacts/${{ github.sha }}-${abi}/* ./packages/core/npm/${abi} | ||
# mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-react/* ./rust-plugins/react/npm/${abi} | ||
# mv /tmp/artifacts/${{ github.sha }}-${abi}-plugin-sass/* ./rust-plugins/sass/npm/${abi} | ||
# mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi} | ||
|
||
test -f ./packages/core/npm/${abi}/farm.${abi}.node | ||
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node | ||
test -f ./rust-plugins/react/npm/${abi}/index.farm | ||
test -f ./rust-plugins/sass/npm/${abi}/index.farm | ||
done | ||
for abi in android-arm-eabi linux-arm-gnueabihf android-arm64 | ||
do | ||
mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi} | ||
test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node | ||
done | ||
# test -f ./packages/core/npm/${abi}/farm.${abi}.node | ||
# test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node | ||
# test -f ./rust-plugins/react/npm/${abi}/index.farm | ||
# test -f ./rust-plugins/sass/npm/${abi}/index.farm | ||
# done | ||
# for abi in android-arm-eabi linux-arm-gnueabihf android-arm64 | ||
# do | ||
# mv /tmp/artifacts/${{ github.sha }}-${abi}-create-farm/* ./packages/create-farm/npm/${abi} | ||
# test -f ./packages/create-farm/npm/${abi}/create-farm.${abi}.node | ||
# done | ||
|
||
- name: Install Dependencies | ||
run: npm install -g [email protected] && pnpm i --frozen-lockfile | ||
- name: Build Plugin Tools | ||
run: pnpm --filter @farmfe/plugin-tools run build | ||
# - name: Install Dependencies | ||
# run: npm install -g [email protected] && pnpm i --frozen-lockfile | ||
# - name: Build Plugin Tools | ||
# run: pnpm --filter @farmfe/plugin-tools run build | ||
|
||
# - name: Set Nightly Version | ||
# run: | | ||
# NIGHTLY_VERSION="2.0.0-nightly.$(date +'%Y%m%d%H%M%S')" | ||
# pnpm version $NIGHTLY_VERSION --no-git-tag-version | ||
# # - name: Set Nightly Version | ||
# # run: | | ||
# # NIGHTLY_VERSION="2.0.0-nightly.$(date +'%Y%m%d%H%M%S')" | ||
# # pnpm version $NIGHTLY_VERSION --no-git-tag-version | ||
|
||
# - name: Publish Nightly to npm | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# run: | | ||
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
# pnpm publish --tag nightly --no-git-checks | ||
# # - name: Publish Nightly to npm | ||
# # env: | ||
# # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# # NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# # run: | | ||
# # echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc | ||
# # pnpm publish --tag nightly --no-git-checks | ||
|
||
- name: Create Nightly Release Pull Request or Publish Nightly Version to npm | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
version: pnpm run bump:nightly | ||
publish: npm run release:nightly | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
# - name: Create Nightly Release Pull Request or Publish Nightly Version to npm | ||
# id: changesets | ||
# uses: changesets/action@v1 | ||
# with: | ||
# version: pnpm run bump:nightly | ||
# publish: npm run release:nightly | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters