-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added CI for both ARMv7 and AArch64 targets using cross. Docker images have also been added to the repo for running the tests with a working instalation of libarchive Signed-off-by: Jonathas-Conceicao <jonathas.conceicao@ossystems.com.br>
- Loading branch information
Jonathas-Conceicao
committed
May 12, 2020
1 parent
864c0aa
commit 2452482
Showing
7 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: CI (AArch64) | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build_and_test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- 1.38.0 # MSRV | ||
- stable | ||
- nightly | ||
|
||
name: Test ${{ matrix.version }} - aarch64-unknown-linux-gnu | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Install ${{ matrix.version }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.version }}- | ||
target: aarch64-unknown-linux-gnu | ||
profile: minimal | ||
override: true | ||
default: true | ||
|
||
- name: Generate Cargo.lock | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
- name: Cache cargo registry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ matrix.version }}-aarch64-unknown-linux-gnu-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Cache cargo index | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/git | ||
key: ${{ matrix.version }}-aarch64-unknown-linux-gnu-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Cache cargo build | ||
uses: actions/cache@v1 | ||
with: | ||
path: target | ||
key: ${{ matrix.version }}-aarch64-unknown-linux-gnu-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Check build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: check | ||
args: --target aarch64-unknown-linux-gnu --release --all --bins --examples --tests | ||
|
||
- name: Tests | ||
uses: actions-rs/cargo@v1 | ||
timeout-minutes: 10 | ||
with: | ||
use-cross: true | ||
command: test | ||
args: --target aarch64-unknown-linux-gnu --release --all --all-features --no-fail-fast -- --nocapture | ||
|
||
- name: Clear the cargo caches | ||
run: | | ||
cargo install cargo-cache --no-default-features --features ci-autoclean | ||
cargo-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: CI (ARMv7) | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
build_and_test: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
version: | ||
- 1.38.0 # MSRV | ||
- stable | ||
- nightly | ||
|
||
name: Test ${{ matrix.version }} - armv7-unknown-linux-gnueabihf | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
- name: Install ${{ matrix.version }} | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.version }}- | ||
target: armv7-unknown-linux-gnueabihf | ||
profile: minimal | ||
override: true | ||
default: true | ||
|
||
- name: Generate Cargo.lock | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: generate-lockfile | ||
- name: Cache cargo registry | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/registry | ||
key: ${{ matrix.version }}-armv7-unknown-linux-gnueabihf-cargo-registry-trimmed-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Cache cargo index | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.cargo/git | ||
key: ${{ matrix.version }}-armv7-unknown-linux-gnueabihf-cargo-index-trimmed-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Cache cargo build | ||
uses: actions/cache@v1 | ||
with: | ||
path: target | ||
key: ${{ matrix.version }}-armv7-unknown-linux-gnueabihf-cargo-build-trimmed-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Check build | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: check | ||
args: --target armv7-unknown-linux-gnueabihf --release --all --bins --examples --tests | ||
|
||
- name: Tests | ||
uses: actions-rs/cargo@v1 | ||
timeout-minutes: 10 | ||
with: | ||
use-cross: true | ||
command: test | ||
args: --target armv7-unknown-linux-gnueabihf --release --all --all-features --no-fail-fast -- --nocapture | ||
|
||
- name: Clear the cargo caches | ||
run: | | ||
cargo install cargo-cache --no-default-features --features ci-autoclean | ||
cargo-cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[target.armv7-unknown-linux-gnueabihf] | ||
image = "jonathasossystems/cross-armv7-libarchive:latest" | ||
|
||
[target.aarch64-unknown-linux-gnu] | ||
image = "jonathasossystems/cross-aarch64-libarchive:latest" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM rustembedded/cross:aarch64-unknown-linux-gnu | ||
RUN dpkg --add-architecture arm64 | ||
RUN apt-get update | ||
RUN apt-get install --assume-yes --no-install-recommends libarchive-dev:arm64 | ||
|
||
ENV PKG_CONFIG=aarch64-linux-gnu-pkg-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
FROM rustembedded/cross:armv7-unknown-linux-gnueabihf | ||
RUN dpkg --add-architecture armhf | ||
RUN apt-get update | ||
RUN apt-get install --assume-yes --no-install-recommends libarchive-dev:armhf | ||
|
||
ENV PKG_CONFIG=arm-linux-gnueabihf-pkg-config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters