steps:
- uses: actions/checkout@v2
+ - uses: actions/cache@v3
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ target/
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
with:
name: macos
path: artifacts/*
- - uses: actions/cache@v3
- with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+
build_windows:
name: 'Build for Windows'
steps:
- uses: actions/checkout@v2
+ - uses: actions/cache@v3
+ with:
+ path: |
+ ~/.cargo/bin/
+ ~/.cargo/registry/index/
+ ~/.cargo/registry/cache/
+ ~/.cargo/git/db/
+ target/
+ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+
- uses: msys2/setup-msys2@v2
with:
install: git mingw-w64-x86_64-go mingw-w64-x86_64-make mingw-w64-x86_64-protobuf mingw-w64-x86_64-rust mingw-w64-x86_64-gcc mingw-w64-x86_64-dlfcn
-
+
- name: Build
run: |
cargo build --release
with:
name: windows
path: artifacts/*
+
+ build_linux:
+ name: 'Build for Linux'
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
- uses: actions/cache@v3
with:
path: |
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- build_linux:
- name: 'Build for Linux'
- runs-on: ubuntu-latest
-
- steps:
- - uses: actions/checkout@v2
- uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
with:
name: linux_glibc
path: artifacts/*
- - uses: actions/cache@v3
- with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}