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

ci: build linux debug binary directly for CI purpose to speedup PR check #7243

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

xc2
Copy link
Collaborator

@xc2 xc2 commented Jul 20, 2024

Summary

Build linux debug binary directly instead of on another container

Applied for:

  1. github shared runner only
  2. the CI Workflow only
  3. Test Linux job only that is typically run test for PR

Will reduce the execute time of build step of Test Linux / Build from >7m to ~5m - typically from image pull and toolchain download.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copy link

netlify bot commented Jul 20, 2024

Deploy Preview for rspack canceled.

Built without sensitive environment variables

Name Link
🔨 Latest commit bb91671
🔍 Latest deploy log https://app.netlify.com/sites/rspack/deploys/669cb90b2df4af000891995c

@xc2 xc2 changed the title ci(CI): build debug binary directly instead of on docker when run on github shared runner ci: build debug binary directly instead of on docker when run on github shared runner Jul 20, 2024
@xc2 xc2 changed the title ci: build debug binary directly instead of on docker when run on github shared runner ci: build linux debug binary directly for CI purpose to speedup PR check Jul 20, 2024
@xc2 xc2 marked this pull request as ready for review July 20, 2024 12:19
@xc2 xc2 requested a review from jerrykingxyz as a code owner July 20, 2024 12:19
@xc2 xc2 force-pushed the ci-native-build-for-test branch from 12508e5 to bb91671 Compare July 21, 2024 07:30
@@ -62,6 +62,7 @@ jobs:
with:
target: x86_64-unknown-linux-gnu
profile: "debug"
native: ${{ needs.get-runner-labels.outputs.LINUX_RUNNER_LABELS == '"ubuntu-latest"' }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can use ${{ startsWith(runner.name, 'GitHub Actions') }} to check whether it runs in github runner.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The runner context is not available here, so I have opted for the loose matching solution out of the three available options:

  1. in ci.yaml, perform a loose match in the with input
  2. in reusable-build.yaml, add startsWith(runner.name, 'GitHub Actions') to everywhere inputs.native-on-shared is.
  3. in resuable-build.yaml, prepend an additional step to create a variable with inputs.native-on-shared && startsWith(runner.name, 'GitHub Actions')

Copy link

stale bot commented Oct 5, 2024

This pull request has been automatically marked as stale because it has not had recent activity. If this pull request is still relevant, please leave any comment (for example, "bump").

@stale stale bot added the stale label Oct 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants