Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
jerrykingxyz committed Jan 3, 2025
1 parent d1f6c64 commit 2c57120
Showing 1 changed file with 39 additions and 35 deletions.
74 changes: 39 additions & 35 deletions .github/workflows/ecosystem-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ecosystem-ci
name: Ecosystem CI

on:
workflow_dispatch:
Expand Down Expand Up @@ -40,17 +40,17 @@ jobs:
name: Get Runner Labels
uses: ./.github/workflows/get-runner-labels.yml

build:
name: Test Linux
needs: [get-runner-labels]
uses: ./.github/workflows/reusable-build.yml
with:
target: x86_64-unknown-linux-gnu
native: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS == '"ubuntu-22.04"' }}
runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }}
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/pull/{0}/head', inputs.pr) || github.sha }}
test: false
bench: false
# build:
# name: Test Linux
# needs: [get-runner-labels]
# uses: ./.github/workflows/reusable-build.yml
# with:
# target: x86_64-unknown-linux-gnu
# native: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS == '"ubuntu-22.04"' }}
# runner: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS }}
# ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/pull/{0}/head', inputs.pr) || github.sha }}
# test: false
# bench: false

create-comment:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -98,15 +98,15 @@ jobs:
script: |
const suiteName = `${{ github.event_name == 'workflow_dispatch' && inputs.suite || '-' }}`;
let result = [
"modernjs",
// "modernjs",
// "nx",
"rspress",
"rslib",
"rsbuild",
"rsdoctor",
// "rspress",
// "rslib",
// "rsbuild",
// "rsdoctor",
"examples",
"devserver",
"nuxt",
// "devserver",
// "nuxt",
]
if (suiteName !== "-") {
result = allSuite.filter(item => item === suiteName)
Expand All @@ -116,59 +116,63 @@ jobs:
})
eco-ci:
needs: [build, calculate-eco-ci-suite]
needs: [calculate-eco-ci-suite]
strategy:
matrix: ${{fromJson(needs.calculate-eco-ci-suite.outputs.suites)}}
fail-fast: false
runs-on: ubuntu-latest
name: eco-ci (${{ matrix.suite }})
runs-on: ubuntu-latest
# runs-on: ${{ fromJSON(needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS) }}
outputs:
diff-result: ${{ steps.run-ci.outputs.diff-result }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event_name == 'workflow_dispatch' && format('pull/{0}/head', inputs.pr) || github.sha }}
ref: ${{ github.event_name == 'workflow_dispatch' && format('refs/pull/{0}/head', inputs.pr) || github.sha }}

# - name: Clean
# uses: ./.github/actions/clean
# with:
# target: x86_64-unknown-linux-gnu

- name: Download bindings
uses: ./.github/actions/download-artifact
with:
name: bindings-x86_64-unknown-linux-gnu
path: crates/node_binding/
try-local-cache: false
# - name: Download bindings
# uses: ./.github/actions/download-artifact
# with:
# name: bindings-x86_64-unknown-linux-gnu
# path: crates/node_binding/
# try-local-cache: false

- name: Show restored binding
shell: bash
run: ls -lah crates/node_binding/*.node
# - name: Show restored binding
# shell: bash
# run: ls -lah crates/node_binding/*.node

- name: Pnpm Cache
uses: ./.github/actions/pnpm-cache

- name: Build JS
run: pnpm run build:js
# - name: Build JS
# run: pnpm run build:js

- name: Run rspack-ecosystem-ci
id: run-ci
run: |
RSPACK_DIR=$(pwd)
git clone --single-branch --depth 1 https://github.com/web-infra-dev/rspack-ecosystem-ci.git
git clone --branch jerry --single-branch --depth 1 https://github.com/web-infra-dev/rspack-ecosystem-ci.git
cd rspack-ecosystem-ci
pnpm i --frozen-lockfile
SUITE='${{ matrix.suite }}'
SUITE_REF='${{ inputs.suiteRef }}'
SUITE_REF='${{ inputs.suiteRef || '-' }}'
if [[ "$SUITE" != "-" && "$SUITE_REF" != "-" ]]; then
echo "run $SUITE with $SUITE_REF"
# run test suite with suiteRef
pnpm tsx ecosystem-ci.ts run-suites --suite-commit "$SUITE_REF" "$SUITE"
echo "run finish with ref"
else
# run test suite
echo "run $SUITE"
pnpm tsx ecosystem-ci.ts run-suites "$SUITE"
echo "run finish"
fi
comment-compare-results:
Expand Down

1 comment on commit 2c57120

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented on 2c57120 Jan 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📝 Ecosystem CI detail: Open

suite result
examples ❌ failure

Please sign in to comment.