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

chore: update github actions #7224

Closed
wants to merge 29 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
b1c884f
chore: update github actions
ForsakenHarmony Feb 1, 2024
12a3149
update artifact actions
ForsakenHarmony Feb 1, 2024
800df68
latest protoc
ForsakenHarmony Feb 1, 2024
7cbfb5f
checkout for status comment action
ForsakenHarmony Feb 1, 2024
ebf9e0b
fix status comment action
ForsakenHarmony Feb 1, 2024
c5290af
fix status comment action again
ForsakenHarmony Feb 2, 2024
b22b116
update graphviz
ForsakenHarmony Feb 8, 2024
46999e1
more node20 (and try library release without container)
ForsakenHarmony Feb 8, 2024
4946727
don't merge release artifacts
ForsakenHarmony Feb 9, 2024
59ab154
version typo
ForsakenHarmony Feb 9, 2024
e6c293c
remove container from lsp
ForsakenHarmony Feb 9, 2024
88d7787
fix status comment
ForsakenHarmony Feb 9, 2024
bb24e91
fix lsp default host
ForsakenHarmony Feb 9, 2024
61cbd98
skip status comment for skipped runs
ForsakenHarmony Feb 9, 2024
f23095c
comment
ForsakenHarmony Feb 9, 2024
2263f9e
try fixing lsp workflow
ForsakenHarmony Feb 9, 2024
bfde283
nvm fixing lsp workflow
ForsakenHarmony Feb 9, 2024
c64ec5a
fix next-swc status comment
ForsakenHarmony Feb 9, 2024
2e007a7
missed the `peter-evans/create-or-update-comment` version
ForsakenHarmony Feb 9, 2024
33ba854
bust cache by removing old cargo group
ForsakenHarmony Feb 9, 2024
4b62ca3
fix bench
ForsakenHarmony Feb 9, 2024
819371e
try fixing corepack
ForsakenHarmony Feb 9, 2024
1e98f2a
use default github token for protoc install
ForsakenHarmony Feb 20, 2024
53dfa7c
update ahash
ForsakenHarmony Feb 20, 2024
6137ff0
print rust toolchain before build
ForsakenHarmony Feb 21, 2024
d5650c1
try to set up rust after node
ForsakenHarmony Feb 21, 2024
db5918c
dbg
ForsakenHarmony Feb 21, 2024
d860f85
bring back windows input for turborepo
ForsakenHarmony Feb 21, 2024
24c2903
fix musl build
ForsakenHarmony Feb 21, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/actions/cargo-sweep/action.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: "cargo-sweep"
description: "Runs cargo-sweep to clean old build artifacts"
runs:
using: "node16"
using: "node20"
main: "dist/main/index.js"
post: "dist/post/index.js"
13 changes: 7 additions & 6 deletions .github/actions/next-integration-stat/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,21 @@ author: Turbopack team
description: "Display next.js integration test failure status"

inputs:
# Github token to use to create test report comment. If not specified, the default token will be used with username 'github-actions'
token:
description: "Github token to use to create test report comment. If not specified, the default token will be used with username 'github-actions'"
default: ${{ github.token }}

# The base of the test results to compare against. If not specified, will try to compare with latest main branch's test results.
diff_base:
description: "The base of the test results to compare against. If not specified, will try to compare with latest main branch's test results."
default: "main"

# Include full test failure message in the report.
# This is currently disabled as we have too many failed test cases, causes
# too many report comment generated.
expand_full_result_message:
description: |
Include full test failure message in the report.
This is currently disabled as we have too many failed test cases, leading to
too many report comments generated.
default: "false"

runs:
using: node16
using: node20
main: index.js
30 changes: 6 additions & 24 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: "Turborepo Node.js Setup"
description: "Sets Node.js up for CI"
inputs:
enable-corepack:
description: "Control turning on corepack."
required: false
default: "true"
extra-flags:
description: "Extra flags to pass to the pnpm install."
required: false
Expand All @@ -13,37 +9,23 @@ inputs:
description: "Don't run the install step."
required: false
default: "true"
node-version:
description: "Node version to install"
required: false
default: "18"

runs:
using: "composite"
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v2.2.4
# TODO: remove when `actions/setup-node` supports corepack properly
- uses: pnpm/action-setup@v3

- name: Setup Node.js
uses: actions/setup-node@v3.6.0
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
node-version-file: package.json
cache: pnpm

- name: Upgrade corepack
if: ${{ inputs.enable-corepack == 'true' && inputs.node-version == '16' }}
shell: bash
# Forcibly upgrade our available version of corepack.
# The bundled version in node 16 has known issues.
# Prepends the npm bin dir so that it is always first.
run: |
npm install --force --global corepack@latest
npm config get prefix >> $GITHUB_PATH

- name: Configure corepack
if: ${{ inputs.enable-corepack == 'true' }}
shell: bash
run: corepack enable
run: |
corepack enable

- name: pnpm install
id: install
Expand Down
14 changes: 7 additions & 7 deletions .github/actions/setup-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
description: "Comma-separated list of components to be additionally installed"
required: false
github-token:
description: "GitHub token. You can pass secrets.GITHUB_TOKEN"
description: "GitHub token to get around rate limits."
required: false
default: ${{ github.token }}
shared-cache-key:
Expand Down Expand Up @@ -59,16 +59,16 @@ runs:
- name: Set Up Protoc
id: set-up-protoc
continue-on-error: true
uses: arduino/setup-protoc@v1.2.0
uses: arduino/setup-protoc@v3.0.0
with:
version: "3.x"
version: "23.x"
repo-token: ${{ inputs.github-token }}
Copy link
Member

Choose a reason for hiding this comment

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

I think we may add some comments describing that this is to avoid rate limit.

Copy link
Member

Choose a reason for hiding this comment

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

Mainly because passing token to setup-rust action looks weird.


- name: Set Up Protoc (second try)
if: steps.set-up-protoc.outcome == 'failure'
uses: arduino/setup-protoc@v1.2.0
uses: arduino/setup-protoc@v3.0.0
with:
version: "3.x"
version: "23.x"
repo-token: ${{ inputs.github-token }}

- name: "Add cargo problem matchers"
Expand All @@ -82,10 +82,10 @@ runs:
with:
shared-key: ${{ inputs.shared-cache-key }}
key: ${{ inputs.cache-key }}
# the cache is huge and we only get 10gb max, so we only save on master
# the cache is huge, and we only get 10gb max, so we only save on master
save-if: ${{ github.ref == 'refs/heads/main' && inputs.save-cache || 'false' }}

- name: "Install cargo-sweep"
- name: "Install cargo-sweep,cargo-groups"
uses: taiki-e/install-action@v2
with:
tool: [email protected],cargo-groups
Expand Down
5 changes: 3 additions & 2 deletions .github/actions/setup-turborepo-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@ inputs:
required: false
default: "false"
github-token:
description: "GitHub token. You can pass secrets.GITHUB_TOKEN"
required: true
description: "GitHub token to get around rate limits."
required: false
default: ${{ github.token }}

runs:
using: "composite"
Expand Down
61 changes: 61 additions & 0 deletions .github/actions/status-comment/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: "Status Comment"
description: "Creates and updates a comment"
inputs:
id:
description: "A marker to uniquely identify the comment for future updates"
required: true
issue-number:
description: 'The number of the issue or pull request in which to create a comment.'
default: ${{ github.event.pull_request.number }}
body:
description: 'The comment body. Cannot be used in conjunction with `body-path`.'
required: false
default: ""
body-path:
description: 'The path to a file containing the comment body. Cannot be used in conjunction with `body`.'
required: false
default: ""

runs:
using: "composite"
steps:
- name: Generate Marker String
id: marker
shell: bash
run: |
echo "marker=<!-- CI COMMENT MARKER: ${{ inputs.id }} -->" >> "$GITHUB_OUTPUT"

- name: Create comment body
id: body
shell: bash
run: |
FILE="${{ inputs.body-path }}"
{
echo "body<<EOF"
if [[ -f "$FILE" ]]; then
cat "$FILE"
else
echo "${{ inputs.body }}"
fi
echo
echo "${{ steps.marker.outputs.marker }}"
echo "EOF"
} >> "$GITHUB_OUTPUT"

- name: Find PR Comment
id: comment
if: github.event_name == 'pull_request'
uses: peter-evans/find-comment@v3
with:
issue-number: ${{ inputs.issue-number }}
comment-author: "github-actions[bot]"
body-includes: ${{ steps.marker.outputs.marker }}

- name: Create or update PR comment
if: github.event_name == 'pull_request'
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ inputs.issue-number }}
comment-id: ${{ steps.comment.outputs.comment-id }}
body: ${{ steps.body.outputs.body }}
edit-mode: replace
2 changes: 1 addition & 1 deletion .github/actions/turbopack-bump/action.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "turbopack-bump"
description: "Releases Turbopack nightly"
runs:
using: "node16"
using: "node20"
main: "dist/index.js"
inputs:
github_token:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/bench-turbopack-scheduled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,13 @@ jobs:
name: Bench - ${{ matrix.bench.title }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: ./.github/actions/setup-node

- uses: ./.github/actions/setup-rust
with:
shared-cache-key: benchmark-bundlers
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Clear potentially cached benchmarks
run: rm -rf target/criterion
Expand All @@ -111,7 +110,7 @@ jobs:

- name: Install critcmp
if: always()
uses: baptiste0928/cargo-install@v1
uses: baptiste0928/cargo-install@v3
with:
crate: critcmp

Expand All @@ -125,7 +124,7 @@ jobs:

- name: Upload results
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.bench.name }}
path: raw.json
Expand All @@ -144,19 +143,19 @@ jobs:
echo "date=$(date +'%s')" >> $GITHUB_OUTPUT
echo "pretty=$(date +'%Y-%m-%d %H:%M')" >> $GITHUB_OUTPUT
- name: Checkout benchmark-data
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: benchmark-data

- name: Download benchmark data
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: data/${{ steps.date.outputs.year }}/${{ steps.date.outputs.month }}/ubuntu-latest-8-core/${{ steps.date.outputs.date }}-${{ github.sha }}

- name: Git pull
run: git pull --depth=1 --no-tags origin benchmark-data

- name: Push data to branch
uses: stefanzweifel/git-auto-commit-action@v4
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Benchmark result for ${{ steps.date.outputs.pretty }} (${{ github.sha }})
Loading
Loading