add cache for pake_build
This commit is contained in:
59
.github/workflows/pake_build.yaml
vendored
59
.github/workflows/pake_build.yaml
vendored
@@ -53,33 +53,35 @@ jobs:
|
|||||||
with:
|
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
|
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
|
version: 1.1
|
||||||
|
|
||||||
|
- name: rust cache restore
|
||||||
|
uses: ylemkimon/cache-restore@v2
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cargo/bin/
|
||||||
|
~/.cargo/registry/index/
|
||||||
|
~/.cargo/registry/cache/
|
||||||
|
~/.cargo/git/db/
|
||||||
|
src-tauri/target/
|
||||||
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||||
|
|
||||||
- name: build for Ubuntu
|
# test build aarch64
|
||||||
if: matrix.os == 'ubuntu-20.04'
|
|
||||||
run: npm run build:all-unix
|
|
||||||
|
|
||||||
- name: build for MacOS
|
|
||||||
if: matrix.os == 'macos-latest'
|
|
||||||
run: |
|
|
||||||
rustup target add aarch64-apple-darwin
|
|
||||||
npm run build:all-unix
|
|
||||||
|
|
||||||
- name: build for windows
|
|
||||||
if: matrix.os == 'windows-latest'
|
|
||||||
run: |
|
|
||||||
npm run build:all-windows
|
|
||||||
|
|
||||||
- name: Upload files
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh
|
|
||||||
bash upload.sh output/*/*.*
|
|
||||||
aarch64-linux:
|
aarch64-linux:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: rust cache restore
|
||||||
|
uses: ylemkimon/cache-restore@v2
|
||||||
|
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
|
- uses: uraimo/run-on-arch-action@v2.3.0
|
||||||
name: build native modules using another arch
|
name: build native modules using another arch
|
||||||
with:
|
with:
|
||||||
@@ -89,6 +91,7 @@ jobs:
|
|||||||
dockerRunArgs: |
|
dockerRunArgs: |
|
||||||
--volume "${PWD}:/build"
|
--volume "${PWD}:/build"
|
||||||
--volume "/home/runner:/home/runner"
|
--volume "/home/runner:/home/runner"
|
||||||
|
--volume "/home/runner/.cargo:/home/runner/.cargo"
|
||||||
install: |
|
install: |
|
||||||
apt-get update && apt-get install -y gnupg2 && apt-get install curl -y
|
apt-get update && apt-get install -y gnupg2 && apt-get install curl -y
|
||||||
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
curl -fsSL https://deb.nodesource.com/setup_18.x | bash -
|
||||||
@@ -104,6 +107,7 @@ jobs:
|
|||||||
source "$HOME/.cargo/env"
|
source "$HOME/.cargo/env"
|
||||||
export RUST_BACKTRACE=1
|
export RUST_BACKTRACE=1
|
||||||
npm run build:all-unix
|
npm run build:all-unix
|
||||||
|
chmod -R 777 /build
|
||||||
|
|
||||||
- name: Upload files
|
- name: Upload files
|
||||||
env:
|
env:
|
||||||
@@ -111,4 +115,15 @@ jobs:
|
|||||||
UPLOADTOOL_ISPRERELEASE: true
|
UPLOADTOOL_ISPRERELEASE: true
|
||||||
run: |
|
run: |
|
||||||
curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh
|
curl -L https://github.com/probonopd/uploadtool/raw/master/upload.sh --output upload.sh
|
||||||
bash upload.sh output/*/*.*
|
bash upload.sh output/*/*.*
|
||||||
|
|
||||||
|
- name: rust cache store
|
||||||
|
uses: actions/cache@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') }}
|
||||||
|
|||||||
Reference in New Issue
Block a user