Skip to content

Commit

Permalink
feat(repo): migrate nightly
Browse files Browse the repository at this point in the history
  • Loading branch information
meeroslav committed Apr 14, 2023
1 parent 1b77feb commit 8f03d88
Show file tree
Hide file tree
Showing 10 changed files with 964 additions and 877 deletions.
3 changes: 3 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ jobs:
NX_E2E_RUN_CYPRESS: 'true'
NX_VERBOSE_LOGGING: 'false'
NX_PERF_LOGGING: 'false'
NX_E2E_SKIP_BUILD_CLEANUP: 'true'
steps:
- run:
name: Configure git metadata (needed for lerna smoke tests)
Expand Down Expand Up @@ -170,6 +171,7 @@ jobs:
NX_VERBOSE_LOGGING: 'false'
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
NX_E2E_SKIP_BUILD_CLEANUP: 'true'
steps:
- run:
name: Set dynamic nx run variable
Expand Down Expand Up @@ -216,6 +218,7 @@ jobs:
NX_E2E_CI_CACHE_KEY: e2e-circleci-macos
NX_DAEMON: 'true'
NX_PERF_LOGGING: 'false'
NX_E2E_SKIP_BUILD_CLEANUP: 'true'
steps:
- run:
name: Set dynamic nx run variable
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/e2e-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8.2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'

- name: Cache node_modules
id: cache-modules
Expand All @@ -54,7 +59,7 @@ jobs:

- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install --prefer-offline --frozen-lockfile --non-interactive
run: pnpm install --frozen-lockfile

- name: Homebrew cache directory path
if: ${{ matrix.os == 'macos-latest' }}
Expand Down Expand Up @@ -312,16 +317,15 @@ jobs:
- name: Prepare dir for output
run: mkdir -p outputs

- name: Install PNPM
if: ${{ matrix.package_manager == 'pnpm' }}
uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v2
with:
version: 7.30.5
version: 8.2

- name: Use Node.js ${{ matrix.node_version }}
- name: Set node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
registry-url: http://localhost:4872

- name: Cache node_modules
Expand All @@ -332,8 +336,7 @@ jobs:
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}

- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install --prefer-offline --frozen-lockfile --non-interactive
run: pnpm install --frozen-lockfile

- name: Cleanup
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down
17 changes: 13 additions & 4 deletions .github/workflows/e2e-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- uses: pnpm/action-setup@v2
with:
version: 8.2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'

- name: Cache node_modules
id: cache-modules
Expand All @@ -44,7 +49,7 @@ jobs:

- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install --prefer-offline --frozen-lockfile --non-interactive
run: pnpm install --frozen-lockfile

- name: Cache Cypress
id: cache-cypress
Expand Down Expand Up @@ -236,10 +241,15 @@ jobs:
- name: Prepare dir for output
run: mkdir -p outputs

- name: Use Node.js ${{ matrix.node_version }}
- uses: pnpm/action-setup@v2
with:
version: 8.2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node_version }}
cache: 'pnpm'
registry-url: http://localhost:4872

- name: Cache node_modules
Expand All @@ -250,8 +260,7 @@ jobs:
key: ${{ runner.os }}-modules-${{ matrix.node_version }}-${{ github.run_id }}

- name: Install packages
if: steps.cache-modules.outputs.cache-hit != 'true'
run: yarn install --prefer-offline --frozen-lockfile --non-interactive
run: pnpm install --frozen-lockfile

- name: Cache Cypress
id: cache-cypress
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/issue-notifier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,27 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js ${{ matrix.node_version }}
- uses: pnpm/action-setup@v2
with:
version: 8.2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: '18'
cache: 'pnpm'
registry-url: http://localhost:4872

- name: Yarn cache directory path
id: yarn-cache-dir-path
shell: bash
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Cache yarn
- name: Cache node_modules
id: cache-modules
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ hashFiles('yarn.lock') }}
lookup-only: true
path: '**/node_modules'
key: pnpm-${{ hashFiles('pnpm-lock.yaml') }}

- name: Install packages
run: yarn install --prefer-offline --frozen-lockfile --non-interactive
run: pnpm install --frozen-lockfile

- name: Download artifact
id: download-artifact
Expand Down
61 changes: 39 additions & 22 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ jobs:
- host: macos-latest
target: x86_64-apple-darwin
build: |
yarn nx -- run-many --target=build-native -- --target=x86_64-apple-darwin
pnpm nx -- run-many --target=build-native -- --target=x86_64-apple-darwin
- host: windows-latest
build: yarn nx -- run-many --target=build-native -- --target=x86_64-pc-windows-msvc
build: pnpm nx -- run-many --target=build-native -- --target=x86_64-pc-windows-msvc
target: x86_64-pc-windows-msvc
# Windows 32bit (not needed)
# - host: windows-latest
Expand All @@ -29,8 +29,8 @@ jobs:
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |-
set -e &&
yarn --version &&
yarn nx -- run-many --target=build-native -- --target=x86_64-unknown-linux-gnu
pnpm --version &&
pnpm nx -- run-many --target=build-native -- --target=x86_64-unknown-linux-gnu
- host: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
Expand All @@ -43,56 +43,62 @@ jobs:
export CXX=$(xcrun -f clang++);
SYSROOT=$(xcrun --sdk macosx --show-sdk-path);
export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT";
yarn nx -- run-many --target=build-native -- --target=aarch64-apple-darwin
pnpm nx -- run-many --target=build-native -- --target=aarch64-apple-darwin
- host: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64
build: |-
set -e &&
yarn --version &&
yarn nx -- run-many --target=build-native -- --target=aarch64-unknown-linux-gnu
pnpm --version &&
pnpm nx -- run-many --target=build-native -- --target=aarch64-unknown-linux-gnu
- host: ubuntu-latest
target: armv7-unknown-linux-gnueabihf
setup: |
sudo apt-get update
sudo apt-get install gcc-arm-linux-gnueabihf -y
build: |
yarn nx -- run-many --target=build-native -- --target=armv7-unknown-linux-gnueabihf
pnpm nx -- run-many --target=build-native -- --target=armv7-unknown-linux-gnueabihf
# Android (not needed)
# - host: ubuntu-latest
# target: aarch64-linux-android
# build: |
# yarn nx -- run-many --target=build-native -- --target=aarch64-linux-android
# pnpm nx -- run-many --target=build-native -- --target=aarch64-linux-android
# - host: ubuntu-latest
# target: armv7-linux-androideabi
# build: |
# yarn nx -- run-many --target=build-native -- --target=armv7-linux-androideabi
# pnpm nx -- run-many --target=build-native -- --target=armv7-linux-androideabi
- host: ubuntu-latest
target: aarch64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: |-
set -e &&
rustup target add aarch64-unknown-linux-musl &&
yarn nx -- run-many --target=build-native -- --target=aarch64-unknown-linux-musl
pnpm nx -- run-many --target=build-native -- --target=aarch64-unknown-linux-musl
- host: windows-latest
target: aarch64-pc-windows-msvc
build: yarn nx -- run-many --target=build-native -- --target=aarch64-pc-windows-msvc
build: pnpm nx -- run-many --target=build-native -- --target=aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
steps:
- uses: actions/checkout@v3
- name: Setup node

- uses: pnpm/action-setup@v2
with:
version: 8.2

- name: Set node
uses: actions/setup-node@v3
if: ${{ !matrix.settings.docker }}
with:
node-version: 18
check-latest: true
cache: yarn
cache: 'pnpm'

- name: Install
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
targets: ${{ matrix.settings.target }}

- name: Cache cargo
uses: actions/cache@v3
with:
Expand All @@ -115,9 +121,11 @@ jobs:
if: matrix.settings.target == 'i686-pc-windows-msvc'
run: yarn config set supportedArchitectures.cpu "ia32"
shell: bash
- name: Install dependencies
run: yarn install

- name: Install packages
run: pnpm install --frozen-lockfile
timeout-minutes: 30

- name: Setup node x86
uses: actions/setup-node@v3
if: matrix.settings.target == 'i686-pc-windows-msvc'
Expand Down Expand Up @@ -201,26 +209,35 @@ jobs:
- build
steps:
- uses: actions/checkout@v3
- name: Setup node

- uses: pnpm/action-setup@v2
with:
version: 8.2

- name: Set node
uses: actions/setup-node@v3
with:
node-version: 18
check-latest: true
cache: yarn
- name: Install dependencies
run: yarn install
cache: 'pnpm'

- name: Install packages
run: pnpm install --frozen-lockfile

- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: List artifacts
run: ls -R artifacts
shell: bash

- name: Publish
run: |
git checkout -b publish/$GITHUB_REF_NAME
npm config set //registry.npmjs.org/:_authToken=$NPM_TOKEN
yarn nx-release --local=false $GITHUB_REF_NAME
pnpm nx-release --local=false $GITHUB_REF_NAME
env:
GH_TOKEN: ${{ github.token }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
"@jest/reporters": "^29.4.3",
"@jest/test-result": "^29.4.3",
"@jest/types": "^29.4.3",
"@lerna/publish": "6.0.0",
"@lerna/version": "6.0.0",
"@monodon/rust": "1.1.1",
"@napi-rs/cli": "2.14.0",
"@nestjs/cli": "^9.1.8",
Expand Down
Loading

0 comments on commit 8f03d88

Please sign in to comment.