-
Notifications
You must be signed in to change notification settings - Fork 26.1k
80 lines (57 loc) · 1.91 KB
/
build_reusable.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build Reusable
on:
workflow_call:
inputs:
afterBuild:
required: false
description: 'additional steps to run'
type: string
env:
NAPI_CLI_VERSION: 2.14.7
TURBO_VERSION: 1.9.4
RUST_TOOLCHAIN: nightly-2023-03-09
PNPM_VERSION: 7.24.3
NODE_MAINTENANCE_VERSION: 16
NODE_LTS_VERSION: 18
TEST_CONCURRENCY: 10
# TODO: remove after testing
NEXT_TEST_CONTINUE_ON_ERROR: 'true'
TURBO_TEAM: 'vercel'
TURBO_REMOTE_ONLY: 'true'
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
NEXT_TELEMETRY_DISABLED: 1
# we build a dev binary for use in CI so skip downloading
# canary next-swc binaries in the monorepo
NEXT_SKIP_NATIVE_POSTINSTALL: 1
TEST_TIMINGS_TOKEN: ${{ secrets.TEST_TIMINGS_TOKEN }}
jobs:
build:
runs-on: [self-hosted, linux, x64]
steps:
- run: env
- run: fnm install 18
- run: fnm use 18
- run: node -v
- run: rustc --version
- run: pwd
- run: rustup toolchain install "${RUST_TOOLCHAIN}"
- run: rustup default "${RUST_TOOLCHAIN}"
- run: npm i -g yarn "pnpm@${PNPM_VERSION}" "turbo@${TURBO_VERSION}" "@napi-rs/cli@${NAPI_CLI_VERSION}"
- uses: actions/checkout@v3
with:
fetch-depth: 25
- run: pnpm store path
- run: pnpm install
- run: pnpm build
- run: turbo run build-native-release --summarize true -- --target x86_64-unknown-linux-gnu
- run: pnpm playwright install-deps
- run: pnpm playwright install chromium
- run: turbo run get-test-timings -- --build ${{ github.sha }} && mv packages/next-swc/test-timings.json ./
- run: git clean -xdf test; git checkout test;
- run: rm -rf /tmp/next-repo-*; rm -rf /tmp/next-install-*
- run: /bin/bash -c "${{ inputs.afterBuild }}"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: turbo run summary
path: .turbo/runs