mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
ci: use free m1 macos runner (#5766)
https://github.blog/changelog/2024-01-30-github-actions-introducing-the-new-m1-macos-runner-available-to-open-source/
This commit is contained in:
35
.github/workflows/build-test.yml
vendored
35
.github/workflows/build-test.yml
vendored
@@ -209,8 +209,8 @@ jobs:
|
|||||||
spec:
|
spec:
|
||||||
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
|
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu }
|
||||||
- { os: windows-latest, target: x86_64-pc-windows-msvc }
|
- { os: windows-latest, target: x86_64-pc-windows-msvc }
|
||||||
- { os: macos-latest, target: x86_64-apple-darwin }
|
- { os: macos-14, target: x86_64-apple-darwin }
|
||||||
- { os: macos-latest, target: aarch64-apple-darwin }
|
- { os: macos-14, target: aarch64-apple-darwin }
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
@@ -462,22 +462,21 @@ jobs:
|
|||||||
runs-on: ${{ matrix.spec.os }}
|
runs-on: ${{ matrix.spec.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
# all combinations: macos-latest x64, macos-latest arm64, windows-latest x64, ubuntu-latest x64
|
|
||||||
matrix:
|
matrix:
|
||||||
spec:
|
spec:
|
||||||
- {
|
- {
|
||||||
os: macos-latest,
|
os: macos-14,
|
||||||
platform: macos,
|
platform: macos,
|
||||||
arch: x64,
|
arch: x64,
|
||||||
target: x86_64-apple-darwin,
|
target: x86_64-apple-darwin,
|
||||||
test: true,
|
test: false,
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
os: macos-latest,
|
os: macos-14,
|
||||||
platform: macos,
|
platform: macos,
|
||||||
arch: arm64,
|
arch: arm64,
|
||||||
target: aarch64-apple-darwin,
|
target: aarch64-apple-darwin,
|
||||||
test: false,
|
test: true,
|
||||||
}
|
}
|
||||||
- {
|
- {
|
||||||
os: ubuntu-latest,
|
os: ubuntu-latest,
|
||||||
@@ -534,7 +533,7 @@ jobs:
|
|||||||
run: yarn workspace @affine/electron build
|
run: yarn workspace @affine/electron build
|
||||||
|
|
||||||
- name: Run desktop tests
|
- name: Run desktop tests
|
||||||
if: ${{ matrix.spec.test && matrix.spec.os == 'ubuntu-latest' }}
|
if: ${{ matrix.spec.os == 'ubuntu-latest' }}
|
||||||
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn workspace @affine-test/affine-desktop e2e
|
run: xvfb-run --auto-servernum --server-args="-screen 0 1280x960x24" -- yarn workspace @affine-test/affine-desktop e2e
|
||||||
|
|
||||||
- name: Run desktop tests
|
- name: Run desktop tests
|
||||||
@@ -542,7 +541,7 @@ jobs:
|
|||||||
run: yarn workspace @affine-test/affine-desktop e2e
|
run: yarn workspace @affine-test/affine-desktop e2e
|
||||||
|
|
||||||
- name: Make bundle
|
- name: Make bundle
|
||||||
if: ${{ matrix.spec.os == 'macos-latest' && matrix.spec.arch == 'arm64' }}
|
if: ${{ matrix.spec.os == 'macos-14' && matrix.spec.arch == 'arm64' }}
|
||||||
env:
|
env:
|
||||||
SKIP_BUNDLE: true
|
SKIP_BUNDLE: true
|
||||||
SKIP_WEB_BUILD: true
|
SKIP_WEB_BUILD: true
|
||||||
@@ -550,7 +549,7 @@ jobs:
|
|||||||
run: yarn workspace @affine/electron package --platform=darwin --arch=arm64
|
run: yarn workspace @affine/electron package --platform=darwin --arch=arm64
|
||||||
|
|
||||||
- name: Output check
|
- name: Output check
|
||||||
if: ${{ matrix.spec.os == 'macos-latest' && matrix.spec.arch == 'arm64' }}
|
if: ${{ matrix.spec.os == 'macos-14' && matrix.spec.arch == 'arm64' }}
|
||||||
run: |
|
run: |
|
||||||
yarn workspace @affine/electron exec node --loader ts-node/esm/transpile-only ./scripts/macos-arm64-output-check.ts
|
yarn workspace @affine/electron exec node --loader ts-node/esm/transpile-only ./scripts/macos-arm64-output-check.ts
|
||||||
|
|
||||||
@@ -561,3 +560,19 @@ jobs:
|
|||||||
name: test-results-e2e-${{ matrix.spec.os }}-${{ matrix.spec.arch }}
|
name: test-results-e2e-${{ matrix.spec.os }}-${{ matrix.spec.arch }}
|
||||||
path: ./test-results
|
path: ./test-results
|
||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
|
|
||||||
|
test-done:
|
||||||
|
needs:
|
||||||
|
- analyze
|
||||||
|
- lint
|
||||||
|
- check-yarn-binary
|
||||||
|
- e2e-test
|
||||||
|
- e2e-migration-test
|
||||||
|
- unit-test
|
||||||
|
- server-test
|
||||||
|
- server-e2e-test
|
||||||
|
- desktop-test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Done
|
||||||
|
run: echo "Done"
|
||||||
|
|||||||
12
.github/workflows/release-desktop.yml
vendored
12
.github/workflows/release-desktop.yml
vendored
@@ -68,15 +68,13 @@ jobs:
|
|||||||
|
|
||||||
make-distribution:
|
make-distribution:
|
||||||
strategy:
|
strategy:
|
||||||
# all combinations: macos-latest x64, macos-latest arm64, ubuntu-latest x64
|
|
||||||
# For windows, we need a separate approach
|
|
||||||
matrix:
|
matrix:
|
||||||
spec:
|
spec:
|
||||||
- runner: macos-latest
|
- runner: macos-14
|
||||||
platform: darwin
|
platform: darwin
|
||||||
arch: x64
|
arch: x64
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
- runner: macos-latest
|
- runner: macos-14
|
||||||
platform: darwin
|
platform: darwin
|
||||||
arch: arm64
|
arch: arm64
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
@@ -153,8 +151,6 @@ jobs:
|
|||||||
|
|
||||||
package-distribution-windows:
|
package-distribution-windows:
|
||||||
strategy:
|
strategy:
|
||||||
# all combinations: macos-latest x64, macos-latest arm64, ubuntu-latest x64
|
|
||||||
# For windows, we need a separate approach
|
|
||||||
matrix:
|
matrix:
|
||||||
spec:
|
spec:
|
||||||
- runner: windows-latest
|
- runner: windows-latest
|
||||||
@@ -228,8 +224,6 @@ jobs:
|
|||||||
make-windows-installer:
|
make-windows-installer:
|
||||||
needs: sign-packaged-artifacts-windows
|
needs: sign-packaged-artifacts-windows
|
||||||
strategy:
|
strategy:
|
||||||
# all combinations: macos-latest x64, macos-latest arm64, ubuntu-latest x64
|
|
||||||
# For windows, we need a separate approach
|
|
||||||
matrix:
|
matrix:
|
||||||
spec:
|
spec:
|
||||||
- runner: windows-latest
|
- runner: windows-latest
|
||||||
@@ -281,8 +275,6 @@ jobs:
|
|||||||
finalize-installer-windows:
|
finalize-installer-windows:
|
||||||
needs: sign-installer-artifacts-windows
|
needs: sign-installer-artifacts-windows
|
||||||
strategy:
|
strategy:
|
||||||
# all combinations: macos-latest x64, macos-latest arm64, ubuntu-latest x64
|
|
||||||
# For windows, we need a separate approach
|
|
||||||
matrix:
|
matrix:
|
||||||
spec:
|
spec:
|
||||||
- runner: windows-latest
|
- runner: windows-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user