Skip to content

Commit e470625

Browse files
Install toolchain properly and configure cache per target
1 parent 5eb9788 commit e470625

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

.github/workflows/build-release-binaries.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,12 @@ jobs:
2424
ref: ${{ github.event.release.target_commitish }}
2525
token: ${{ secrets.BOTTY_GITHUB_TOKEN }}
2626

27+
- name: Install toolchain from rust-toolchain file
28+
run: rustup show
29+
2730
- uses: Swatinem/rust-cache@v1.3.0
31+
with:
32+
key: ${{ matrix.target }}
2833

2934
- name: Install compiler for armhf arch
3035
if: matrix.target == 'armv7-unknown-linux-gnueabihf'

.github/workflows/ci.yml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ jobs:
1313
- name: Checkout sources
1414
uses: actions/checkout@v2.3.4
1515

16+
- name: Install toolchain from rust-toolchain file
17+
run: rustup show
18+
1619
- uses: Swatinem/rust-cache@v1.3.0
20+
with:
21+
key: ${{ matrix.target }}
1722

1823
- name: Check formatting
1924
uses: dprint/check@v1.5
@@ -38,18 +43,24 @@ jobs:
3843
- name: Checkout sources
3944
uses: actions/checkout@v2.3.4
4045

46+
- name: Install toolchain from rust-toolchain file
47+
run: rustup show
48+
49+
- uses: Swatinem/rust-cache@v1.3.0
50+
with:
51+
key: ${{ matrix.target }}
52+
4153
- name: Install compiler for armhf arch
4254
if: matrix.target == 'armv7-unknown-linux-gnueabihf'
4355
run: |
4456
sudo apt-get update
4557
sudo apt-get install gcc-arm-linux-gnueabihf
4658
4759
- name: Build binary
48-
run: |
49-
cargo build -p rendezvous-server --target ${{ matrix.target }}
60+
run: cargo build -p rendezvous-server --target ${{ matrix.target }}
5061

5162
- name: Upload rendezvous-server binary
5263
uses: actions/upload-artifact@v2-preview
5364
with:
5465
name: rendezvous-server-${{ matrix.target }}
55-
path: target/${{ matrix.target }}/debug/rendezvous-server
66+
path: target/${{ matrix.target }}/debug/rendezvous-server

0 commit comments

Comments
 (0)