-
Notifications
You must be signed in to change notification settings - Fork 529
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into event-loop-lag
- Loading branch information
Showing
16 changed files
with
206 additions
and
44 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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Backport | ||
on: | ||
pull_request_target: | ||
types: | ||
- closed | ||
- labeled | ||
|
||
permissions: | ||
pull-requests: write | ||
contents: write | ||
|
||
jobs: | ||
backport: | ||
runs-on: ubuntu-latest | ||
if: > | ||
github.event.pull_request.merged | ||
&& ( | ||
github.event.action == 'closed' | ||
|| ( | ||
github.event.action == 'labeled' | ||
&& contains(github.event.label.name, 'backport') | ||
) | ||
) | ||
name: Backport | ||
steps: | ||
- name: Backport | ||
uses: tibdex/backport@v2 | ||
with: | ||
github_token: ${{ secrets.GITHUB_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
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 |
---|---|---|
@@ -0,0 +1,102 @@ | ||
name: Node.js compiled --shared-builtin-undici/undici-path CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- current | ||
- next | ||
- 'v*' | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test-shared-builtin: | ||
name: Test with Node.js ${{ matrix.version }} compiled --shared-builtin-undici/undici-path | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 0 | ||
matrix: | ||
version: [20, 22] | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 120 | ||
steps: | ||
# Checkout into a subdirectory otherwise Node.js tests will break due to finding Undici's package.json in a parent directory. | ||
- name: Checkout | ||
uses: actions/checkout@9bb56186c3b09b4f86b1c65136769dd318469633 # v4.1.2 | ||
with: | ||
path: ./undici | ||
persist-credentials: false | ||
|
||
# Setup node, install deps, and build undici prior to building node with `--shared-builtin-undici/undici-path` and testing | ||
- name: Setup Node.js@${{ inputs.version }} | ||
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 | ||
with: | ||
node-version: ${{ inputs.version }} | ||
|
||
- name: Install dependencies | ||
working-directory: ./undici | ||
run: npm install | ||
|
||
- name: Install wasi-libc | ||
run: sudo apt-get install -y wasi-libc | ||
|
||
- name: Build WASM | ||
working-directory: ./undici | ||
run: | | ||
export EXTERNAL_PATH=${{ github.workspace }}/undici | ||
export WASM_CC=clang | ||
export WASM_CFLAGS='--target=wasm32-wasi --sysroot=/usr' | ||
export WASM_LDFLAGS='-nodefaultlibs' | ||
export WASM_LDLIBS='-lc' | ||
node build/wasm.js | ||
- name: Determine latest release | ||
id: release | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | ||
with: | ||
result-encoding: string | ||
script: | | ||
const req = await fetch('https://nodejs.org/download/release/index.json') | ||
const releases = await req.json() | ||
const latest = releases.find((r) => r.version.startsWith('v${{ matrix.version }}')) | ||
return latest.version | ||
- name: Download and extract source | ||
run: curl https://nodejs.org/download/release/${{ steps.release.outputs.result }}/node-${{ steps.release.outputs.result }}.tar.xz | tar xfJ - | ||
|
||
- name: Install ninja | ||
run: sudo apt-get install ninja-build | ||
|
||
- name: ccache | ||
uses: hendrikmuhs/ccache-action@c92f40bee50034e84c763e33b317c77adaa81c92 #v1.2.13 | ||
with: | ||
key: node(external_undici)${{ matrix.version }} | ||
|
||
- name: Build node | ||
working-directory: ./node-${{ steps.release.outputs.result }} | ||
run: | | ||
export CC="ccache gcc" | ||
export CXX="ccache g++" | ||
rm -rf deps/undici | ||
./configure --shared-builtin-undici/undici-path ${{ github.workspace }}/undici/loader.js --ninja --prefix=./final | ||
make | ||
make install | ||
echo "$(pwd)/final/bin" >> $GITHUB_PATH | ||
- name: Print version information | ||
run: | | ||
echo OS: $(node -p "os.version()") | ||
echo Node.js: $(node --version) | ||
echo npm: $(npm --version) | ||
echo git: $(git --version) | ||
echo external config: $(node -e "console.log(process.config)" | grep NODE_SHARED_BUILTIN_UNDICI_UNDICI_PATH) | ||
echo Node.js built-in undici version: $(node -p "process.versions.undici") # undefined for external Undici | ||
- name: Run tests | ||
working-directory: ./node-${{ steps.release.outputs.result }} | ||
run: tools/test.py -p dots --flaky-tests=dontcare | ||
|
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.