Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick check in release workflow #2583

Closed
Tracked by #2472
IWANABETHATGUY opened this issue Apr 3, 2023 · 8 comments
Closed
Tracked by #2472

quick check in release workflow #2583

IWANABETHATGUY opened this issue Apr 3, 2023 · 8 comments
Assignees
Labels
team The issue/pr is created by the member of Rspack.

Comments

@IWANABETHATGUY
Copy link
Contributor

IWANABETHATGUY commented Apr 3, 2023

Context

  1. Our release took a drastically long time to run the test, build and publish release flow, it often took about 90 minutes, so it would be quite depressing if napi build and testing is successful but finally failed of a type error, e.g. https://github.com/web-infra-dev/rspack/actions/runs/4592313955/jobs/8109920424

Solution

  1. for action in this range:
    https://github.com/web-infra-dev/rspack/actions/runs/4592313955/workflow#L405-L440
    we could add an extra job, called pre-check-release
    here is the almost correctly code:
name: Pre check release 
    permissions:
      contents: write
    runs-on: ubuntu-latest
    needs:
-     - test-x86_64-unknown-linux-gnu
-     - test-aarch64-unknown-linux-gnu
-     - test-x86_64-unknown-linux-musl
-     - test-aarch64-unknown-linux-musl
-     - test-x86_64-apple-darwin
+    - build-x86_64-unknown-linux-gnu
    if: ${{ github.event_name == 'workflow_dispatch' }}
    steps:
      - name: Checkout Repo
        uses: actions/checkout@master
        with:
          # This makes Actions fetch only one branch to release
          fetch-depth: 1
      - uses: actions/setup-node@v3
        with:
          node-version: "16"
      - name: Setup node dependencies
        run: |
          npm install -g [email protected]
          pnpm install
      - name: Download artifacts
        uses: actions/download-artifact@v3
        with:
          path: artifacts
      - name: Build node packages
        run: pnpm run build:js
      - name: Move artifacts
        run: node scripts/build-npm.js
      - name: Show binding packages
        run: ls -R npm
      - name: Link optional dependencies
        run: pnpm install --no-frozen-lockfile

This code could let release failed fast because only dependents on build-x86_64-unknown-linux-gnu which only took about 20min.

@github-actions github-actions bot added needs-triage team The issue/pr is created by the member of Rspack. labels Apr 3, 2023
@IWANABETHATGUY IWANABETHATGUY added this to the build infra milestone Apr 3, 2023
@hyf0
Copy link
Contributor

hyf0 commented Apr 3, 2023

Does spell-check ci cost a lot of time? If not, I suggest enabling it not only on the main branch.

@IWANABETHATGUY
Copy link
Contributor Author

@hyf0
Copy link
Contributor

hyf0 commented Apr 3, 2023

No, it already enables in pr branch https://github.com/speedy-js/rspack/blob/2d9eaf727603a6c0046a94c049ef8f21a82ad486/.github/workflows/check-rs.yaml#L9-L17

Noticed. I believe it misses the CONTRIBUTING.md.

@hardfist
Copy link
Contributor

hardfist commented Apr 3, 2023

is build-x86_64-unknown-linux-gnu a debug version or release version?

@IWANABETHATGUY
Copy link
Contributor Author

IWANABETHATGUY commented Apr 3, 2023

is build-x86_64-unknown-linux-gnu a debug version or release version?

According to the config file, https://github.com/speedy-js/rspack/blob/2d9eaf727603a6c0046a94c049ef8f21a82ad486/.github/workflows/release.yml#L80, release build

@IWANABETHATGUY
Copy link
Contributor Author

No, it already enables in pr branch https://github.com/speedy-js/rspack/blob/2d9eaf727603a6c0046a94c049ef8f21a82ad486/.github/workflows/check-rs.yaml#L9-L17

Noticed. I believe it misses the CONTRIBUTING.md.

According to the doc of typos , you could try your own locally:

  1. cargo install typos-cli
  2. typos
    I think this might be a bug of typos, or we don't config it correctly.

@IWANABETHATGUY
Copy link
Contributor Author

No, it already enables in pr branch https://github.com/speedy-js/rspack/blob/2d9eaf727603a6c0046a94c049ef8f21a82ad486/.github/workflows/check-rs.yaml#L9-L17

Noticed. I believe it misses the CONTRIBUTING.md.

Maybe related to crate-ci/typos#698

@IWANABETHATGUY IWANABETHATGUY self-assigned this Apr 3, 2023
@IWANABETHATGUY
Copy link
Contributor Author

I don't found any method to precheck this step https://github.com/web-infra-dev/rspack/actions/runs/4592313955/workflow#L441-L448, closed for now, feel free to open a pr to check it.
Closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team The issue/pr is created by the member of Rspack.
Projects
None yet
Development

No branches or pull requests

3 participants