Skip to content

Revert "Drop the Android build job" #1089

Revert "Drop the Android build job"

Revert "Drop the Android build job" #1089

Workflow file for this run

---
name: devicemapper CI
# yamllint disable-line rule:truthy
on:
push:
branches:
- master
paths-ignore:
- 'CHANGES.txt'
- '**/README.md'
pull_request:
branches:
- master
paths-ignore:
- 'CHANGES.txt'
- '**/README.md'
workflow_dispatch:
jobs:
checks:
strategy:
matrix:
include:
- components: rustfmt
toolchain: 1.80.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile fmt-ci
- components: clippy
toolchain: 1.80.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile clippy
- components: cargo
toolchain: 1.80.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile build
- components: cargo
toolchain: 1.80.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile docs
- components: cargo
toolchain: 1.80.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
task: make -f Makefile check-typos
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: ${{ matrix.components }}
toolchain: ${{ matrix.toolchain }}
- uses: baptiste0928/cargo-install@v3
with:
crate: typos-cli
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- name: Test ${{ matrix.task }} on ${{ matrix.toolchain }} toolchain
run: ${{ matrix.task }}
tests-with-sudo:
strategy:
matrix:
include:
- toolchain: 1.71.1 # LOWEST SUPPORTED RUST TOOLCHAIN
- toolchain: 1.80.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: ${{ matrix.toolchain }}
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libdevmapper-dev
- name: Set toolchain override with sudo
run: sudo /home/runner/.cargo/bin/rustup override set ${{ matrix.toolchain }} # yamllint disable rule:line-length
- name: Run all tests on ${{ matrix.toolchain }} toolchain
run: sudo PATH=$GITHUB_WORKSPACE/.cargo/bin:$PATH make -f Makefile sudo_test # yamllint disable rule:line-length
android-build:
env:
TARGET: aarch64-linux-android
runs-on: ubuntu-20.04
container:
image: docker.io/circleci/android:api-31-ndk
options: --user 0:0
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get -q update
sudo apt-get -y install libclang-dev
- uses: dtolnay/rust-toolchain@master
with:
components: cargo
toolchain: 1.80.1 # CURRENT DEVELOPMENT RUST TOOLCHAIN
targets: x86_64-unknown-linux-gnu
- name: Add Android target
run: rustup target add ${{ env.TARGET }}
- name: Cross compilation build on Android
run: cargo build --target ${{ env.TARGET }}
# VERIFICATION OF TEST INFRASTRUCTURE
yamllint:
runs-on: ubuntu-20.04
container:
image: fedora:40 # CURRENT DEVELOPMENT ENVIRONMENT
steps:
- uses: actions/checkout@v4
- name: Install dependencies for Fedora
run: dnf install -y make yamllint
- name: Run yamllint
run: make -f Makefile yamllint