diff options
| author | Linus Färnstrand <faern@faern.net> | 2023-05-11 15:38:39 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2023-05-24 13:06:19 +0200 |
| commit | dfbcf0e47721b64500a416793d7c61a76850d01f (patch) | |
| tree | 5bde1d8a91be22c7b6dddbf793018420b47f480e /.github | |
| parent | 47a937e581b205baa52b4478292966bbe0a6cf4a (diff) | |
| download | mullvadvpn-dfbcf0e47721b64500a416793d7c61a76850d01f.tar.xz mullvadvpn-dfbcf0e47721b64500a416793d7c61a76850d01f.zip | |
Run cargo clippy against Android
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/clippy.yml | 45 |
1 files changed, 42 insertions, 3 deletions
diff --git a/.github/workflows/clippy.yml b/.github/workflows/clippy.yml index 8d55bd2c05..882cc62d09 100644 --- a/.github/workflows/clippy.yml +++ b/.github/workflows/clippy.yml @@ -8,7 +8,28 @@ on: - '**/*.rs' workflow_dispatch: jobs: - clippy_check: + prepare-android: + name: Prepare Android container + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Use custom container image if specified + if: ${{ github.event.inputs.override_container_image != '' }} + run: echo "inner_container_image_android=${{ github.event.inputs.override_container_image }}" + >> $GITHUB_ENV + + - name: Use default container image and resolve digest + if: ${{ github.event.inputs.override_container_image == '' }} + run: | + echo "inner_container_image_android=$(cat ./building/android-container-image.txt)" >> $GITHUB_ENV + + outputs: + container_image_android: ${{ env.inner_container_image_android }} + + clippy-check-desktop: + name: Clippy linting, desktop strategy: matrix: os: [ubuntu-latest, windows-latest, macos-latest] @@ -39,7 +60,25 @@ jobs: - name: Clippy check shell: bash - run: |- - export RUSTFLAGS="--deny warnings" + env: + RUSTFLAGS: --deny warnings + run: | source env.sh time cargo clippy --locked -- -W clippy::unused_async + + clippy-check-android: + name: Clippy linting, Android + needs: prepare-android + runs-on: ubuntu-latest + container: + image: ${{ needs.prepare-android.outputs.container_image_android }} + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Clippy check + env: + RUSTFLAGS: --deny warnings + run: | + cargo clippy --locked --target x86_64-linux-android --package mullvad-jni -- -W clippy::unused_async |
