Skip to content

Commit

Permalink
ci: remove nx-cloud (#9203)
Browse files Browse the repository at this point in the history
  • Loading branch information
Brooooooklyn committed Dec 19, 2024
1 parent da0f3d0 commit 4c48aee
Show file tree
Hide file tree
Showing 21 changed files with 40 additions and 895 deletions.
6 changes: 1 addition & 5 deletions .github/actions/build-rust/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ inputs:
package:
description: 'Package to build'
required: true
nx_token:
description: 'Nx Cloud access token'
required: false

runs:
using: 'composite'
Expand Down Expand Up @@ -49,7 +46,6 @@ runs:
- name: Build
shell: bash
run: |
yarn workspace ${{ inputs.package }} nx build ${{ inputs.package }} --verbose -- --target ${{ inputs.target }} --use-napi-cross
yarn workspace ${{ inputs.package }} build --target ${{ inputs.target }} --use-napi-cross
env:
NX_CLOUD_ACCESS_TOKEN: ${{ inputs.nx_token }}
DEBUG: 'napi:*'
10 changes: 3 additions & 7 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@ on:
type: string
required: true

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: 'write'
id-token: 'write'
Expand Down Expand Up @@ -50,7 +47,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Build Core
run: yarn nx build @affine/web --skip-nx-cache
run: yarn workspace @affine/web build
env:
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -83,7 +80,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Build Admin
run: yarn nx build @affine/admin --skip-nx-cache
run: yarn workspace @affine/admin build
env:
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -115,7 +112,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Build Mobile
run: yarn nx build @affine/mobile --skip-nx-cache
run: yarn workspace @affine/mobile build
env:
R2_ACCOUNT_ID: ${{ secrets.R2_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
Expand Down Expand Up @@ -163,7 +160,6 @@ jobs:
with:
target: ${{ matrix.targets.name }}
package: '@affine/server-native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- name: Upload ${{ matrix.targets.file }}
uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ env:
AFFINE_ENV: dev
COVERAGE: true
MACOSX_DEPLOYMENT_TARGET: '10.13'
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/node_modules/.cache/ms-playwright
DEPLOYMENT_TYPE: affine

Expand Down Expand Up @@ -195,7 +194,7 @@ jobs:
path: ./packages/frontend/native

- name: Unit Test
run: yarn nx test:coverage @affine/monorepo
run: yarn test:coverage

- name: Upload unit test coverage results
uses: codecov/codecov-action@v5
Expand Down Expand Up @@ -238,7 +237,6 @@ jobs:
with:
target: ${{ matrix.spec.target }}
package: '@affine/native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- name: Upload ${{ steps.filename.outputs.filename }}
uses: actions/upload-artifact@v4
with:
Expand All @@ -263,7 +261,6 @@ jobs:
with:
target: 'x86_64-unknown-linux-gnu'
package: '@affine/server-native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- name: Upload server-native.node
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/copilot-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ on:
workflow_dispatch:

env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
PLAYWRIGHT_BROWSERS_PATH: ${{ github.workspace }}/node_modules/.cache/ms-playwright

jobs:
Expand All @@ -25,7 +24,6 @@ jobs:
with:
target: 'x86_64-unknown-linux-gnu'
package: '@affine/server-native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- name: Upload server-native.node
uses: actions/upload-artifact@v4
with:
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ on:
- beta
- stable
- internal
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}

permissions:
contents: 'write'
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/release-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_RELEASE: ${{ steps.version.outputs.APP_VERSION }}
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
SKIP_NX_CACHE: 'true'
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}

- name: Upload web artifact
Expand Down Expand Up @@ -117,7 +116,6 @@ jobs:
with:
target: ${{ matrix.spec.target }}
package: '@affine/native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: web
Expand Down Expand Up @@ -233,7 +231,6 @@ jobs:
with:
target: ${{ matrix.spec.target }}
package: '@affine/native'
nx_token: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
- uses: actions/download-artifact@v4
with:
name: web
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/release-mobile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ jobs:
- name: Setup @sentry/cli
uses: ./.github/actions/setup-sentry
- name: Build Mobile
run: yarn nx build @affine/ios --skip-nx-cache
run: yarn workspace @affine/ios build
env:
PUBLIC_PATH: '/'
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}
Expand All @@ -78,7 +78,6 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_RELEASE: ${{ steps.version.outputs.APP_VERSION }}
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
SKIP_NX_CACHE: 'true'
- name: Upload ios artifact
uses: actions/upload-artifact@v4
with:
Expand All @@ -102,7 +101,7 @@ jobs:
- name: Setup @sentry/cli
uses: ./.github/actions/setup-sentry
- name: Build Mobile
run: yarn nx build @affine/android --skip-nx-cache
run: yarn workspace @affine/android build
env:
PUBLIC_PATH: '/'
MIXPANEL_TOKEN: ${{ secrets.MIXPANEL_TOKEN }}
Expand All @@ -112,7 +111,6 @@ jobs:
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_RELEASE: ${{ steps.version.outputs.APP_VERSION }}
RELEASE_VERSION: ${{ steps.version.outputs.APP_VERSION }}
SKIP_NX_CACHE: 'true'
- name: Upload android artifact
uses: actions/upload-artifact@v4
with:
Expand Down
5 changes: 2 additions & 3 deletions docs/building-desktop-client-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,17 +46,16 @@ Please refer to `Build Native Dependencies` section in [BUILDING.md](./BUILDING.
On Mac & Linux

```shell
BUILD_TYPE=canary SKIP_NX_CACHE=1 yarn workspace @affine/electron generate-assets
BUILD_TYPE=canary yarn workspace @affine/electron generate-assets
```

On Windows (powershell)

```powershell
$env:BUILD_TYPE="canary"
$env:SKIP_NX_CACHE=1
$env:DISTRIBUTION=desktop
$env:SKIP_WEB_BUILD=1
yarn build --skip-nx-cache
yarn build
```

### 2. Re-config yarn, clean up the node_modules and reinstall the dependencies
Expand Down
100 changes: 0 additions & 100 deletions nx.json

This file was deleted.

6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"dev": "yarn workspace @affine/cli dev",
"build": "yarn workspace @affine/cli bundle",
"dev:electron": "yarn workspace @affine/electron dev",
"build:electron": "yarn nx build @affine/electron",
"build:server-native": "yarn nx run-many -t build -p @affine/server-native",
"build:electron": "yarn workspace @affine/electron build",
"build:server-native": "yarn workspace @affine/server-native build",
"start:web-static": "yarn workspace @affine/web static-server",
"lint:eslint": "cross-env NODE_OPTIONS=\"--max-old-space-size=8192\" eslint --report-unused-disable-directives-severity=off . --cache",
"lint:eslint:fix": "yarn lint:eslint --fix",
Expand Down Expand Up @@ -83,8 +83,6 @@
"husky": "^9.1.7",
"lint-staged": "^15.2.11",
"msw": "^2.6.8",
"nx": "^20.2.2",
"nx-cloud": "^19.1.0",
"oxlint": "0.15.0",
"prettier": "^3.4.2",
"semver": "^7.6.3",
Expand Down
1 change: 0 additions & 1 deletion packages/backend/native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"devDependencies": {
"@napi-rs/cli": "3.0.0-alpha.64",
"lib0": "^0.2.99",
"nx": "^20.2.2",
"tiktoken": "^1.0.17",
"tinybench": "^3.0.7",
"yjs": "patch:yjs@npm%3A13.6.18#~/.yarn/patches/yjs-npm-13.6.18-ad0d5f7c43.patch"
Expand Down
25 changes: 0 additions & 25 deletions packages/backend/native/project.json

This file was deleted.

Loading

0 comments on commit 4c48aee

Please sign in to comment.