From 6aa39403bd1512a842c50056d1b95c1ef2e1db1c Mon Sep 17 00:00:00 2001 From: Tw93 Date: Sun, 5 Mar 2023 15:28:02 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E5=85=88=E5=8E=BB=E6=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pake_build.yaml | 58 +--------------- .github/workflows/pake_build_with_cache.yaml | 70 +------------------- 2 files changed, 6 insertions(+), 122 deletions(-) diff --git a/.github/workflows/pake_build.yaml b/.github/workflows/pake_build.yaml index 31dd9ff..0c69a33 100644 --- a/.github/workflows/pake_build.yaml +++ b/.github/workflows/pake_build.yaml @@ -46,14 +46,14 @@ jobs: profile: minimal override: true target: ${{ matrix.target }} - + - name: install dependencies (ubuntu only) if: matrix.os == 'ubuntu-20.04' uses: awalsh128/cache-apt-pkgs-action@latest with: packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra version: 1.1 - + - name: rust cache restore uses: actions/cache/restore@v3 with: @@ -64,7 +64,7 @@ jobs: ~/.cargo/git/db/ src-tauri/target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - + - name: build for Ubuntu if: matrix.os == 'ubuntu-20.04' run: npm run build:all-unix @@ -87,55 +87,3 @@ jobs: run: | curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh bash upload.sh output/*/*.* - - # test build aarch64 - aarch64-linux: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - - name: rust cache restore - uses: actions/cache/restore@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - src-tauri/target/ - key: ${{ runner.os }}-aarch64-cargo-${{ hashFiles('**/Cargo.lock') }} - - - uses: uraimo/run-on-arch-action@v2.3.0 - name: build native modules using another arch - with: - arch: aarch64 - distro: ubuntu20.04 - githubToken: ${{ github.token }} - dockerRunArgs: | - --volume "${PWD}:/build" - --volume "/home/runner:/home/runner" - --volume "/home/runner/.cargo:/home/runner/.cargo" - install: | - apt-get update && apt-get install -y gnupg2 && apt-get install curl -y - curl -fsSL https://deb.nodesource.com/setup_18.x | bash - - apt-get install -y nodejs gcc g++ make - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source "$HOME/.cargo/env" - apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra - corepack enable - run: | - uname -a - chmod -R 777 /build - npm install - source "$HOME/.cargo/env" - export RUST_BACKTRACE=1 - npm run build:all-unix - chmod -R 777 /build - - - name: Upload files - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - UPLOADTOOL_ISPRERELEASE: true - run: | - curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh - bash upload.sh output/*/*.* diff --git a/.github/workflows/pake_build_with_cache.yaml b/.github/workflows/pake_build_with_cache.yaml index cff800c..d75984d 100644 --- a/.github/workflows/pake_build_with_cache.yaml +++ b/.github/workflows/pake_build_with_cache.yaml @@ -43,14 +43,14 @@ jobs: profile: minimal override: true target: ${{ matrix.target }} - + - name: install dependencies (ubuntu only) if: matrix.os == 'ubuntu-20.04' uses: awalsh128/cache-apt-pkgs-action@latest with: packages: libwebkit2gtk-4.0-dev build-essential curl wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra version: 1.1 - + - name: rust cache restore uses: actions/cache/restore@v3 with: @@ -84,7 +84,7 @@ jobs: run: | curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh bash upload.sh output/*/*.* - + - name: rust cache store uses: actions/cache/save@v3 with: @@ -95,67 +95,3 @@ jobs: ~/.cargo/git/db/ src-tauri/target/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - - - # test build aarch64 - aarch64-linux: - runs-on: ubuntu-20.04 - steps: - - uses: actions/checkout@v3 - - - name: rust cache restore - uses: actions/cache/restore@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - src-tauri/target/ - key: ${{ runner.os }}-aarch64-cargo-${{ hashFiles('**/Cargo.lock') }} - - - uses: uraimo/run-on-arch-action@v2.3.0 - name: build native modules using another arch - with: - arch: aarch64 - distro: ubuntu20.04 - githubToken: ${{ github.token }} - dockerRunArgs: | - --volume "${PWD}:/build" - --volume "/home/runner:/home/runner" - --volume "/home/runner/.cargo:/home/runner/.cargo" - install: | - apt-get update && apt-get install -y gnupg2 && apt-get install curl -y - curl -fsSL https://deb.nodesource.com/setup_18.x | bash - - apt-get install -y nodejs gcc g++ make - curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y - source "$HOME/.cargo/env" - apt-get install -y libwebkit2gtk-4.0-dev build-essential wget libssl-dev libgtk-3-dev libayatana-appindicator3-dev librsvg2-dev gnome-video-effects gnome-video-effects-extra - corepack enable - run: | - uname -a - chmod -R 777 /build - npm install - source "$HOME/.cargo/env" - export RUST_BACKTRACE=1 - npm run build:all-unix - chmod -R 777 /build - - - name: Upload files - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - UPLOADTOOL_ISPRERELEASE: true - run: | - curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh - bash upload.sh output/*/*.* - - - name: rust cache store - uses: actions/cache/save@v3 - with: - path: | - ~/.cargo/bin/ - ~/.cargo/registry/index/ - ~/.cargo/registry/cache/ - ~/.cargo/git/db/ - src-tauri/target/ - key: ${{ runner.os }}-aarch64-cargo-${{ hashFiles('**/Cargo.lock') }} \ No newline at end of file