mirror of
https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation.git
synced 2026-08-09 15:19:11 +02:00
Cherry picking of lints from clippy::pedantic / clippy::nursery / clippy::unwrap_used / clippy::expect_used Notable changes : - consideration of all clippy::use-self lints - replaced sort() by unstable_sort() - use of map_or_else() when appropriate - replaced "".to_string() by String::new() - replaced collect() + len() by count() The code base now passes all the clippy::nursery lints --------- Co-authored-by: w1nst0n <w1nst0n@keemail.me>
65 lines
2.5 KiB
YAML
65 lines
2.5 KiB
YAML
name: Build artifacts
|
|
on:
|
|
workflow_dispatch:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
build:
|
|
name: Building ${{ matrix.build_target }} [${{ matrix.graphics }}] [${{ matrix.update_feature }}]
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
build_target: [linux, macos, windows]
|
|
graphics: [glow, wgpu]
|
|
update_feature: [self-update, no-self-update]
|
|
exclude:
|
|
- build_target: windows
|
|
update_feature: no-self-update
|
|
include:
|
|
- build_target: linux
|
|
os: ubuntu-latest
|
|
- build_target: macos
|
|
os: macos-latest
|
|
- build_target: windows
|
|
os: windows-latest
|
|
- graphics: glow
|
|
renderer: "-opengl"
|
|
- graphics: wgpu
|
|
renderer: "" # Vulkan but we don't want this in the binary filename
|
|
- update_feature: self-update
|
|
update_name: "" # we don't want this in the binary filename
|
|
- update_feature: no-self-update
|
|
update_name: "-noseflupdate"
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: rui314/setup-mold@v1 # faster linker
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.cargo/bin/
|
|
~/.cargo/registry/index/
|
|
~/.cargo/registry/cache/
|
|
~/.cargo/git/db/
|
|
target
|
|
key: ${{ runner.os }}-release-${{ hashFiles('**/Cargo.lock') }}
|
|
restore-keys: ${{ runner.OS }}-release-
|
|
if: matrix.os == 'ubuntu-latest'
|
|
- name: Building
|
|
run: cargo build --release --no-default-features --features ${{ matrix.graphics }},${{ matrix.update_feature }}
|
|
- name: Creating ./bin directory
|
|
run: mkdir -p bin
|
|
- name: Renaming binaries [Windows]
|
|
if: matrix.os == 'windows-latest'
|
|
run: mv target/release/uad_gui.exe bin/uad_gui-${{ matrix.build_target }}${{ matrix.renderer }}.exe
|
|
- name: Renaming binaries [Others]
|
|
if: matrix.os != 'windows-latest'
|
|
run: mv target/release/uad_gui bin/uad_gui${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }}
|
|
- name: Tarball Linux/MacOS binary
|
|
if: matrix.os != 'windows-latest'
|
|
run: tar -czf bin/uad_gui${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }}{.tar.gz,}
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: uad_gui${{ matrix.update_name }}-${{ matrix.build_target }}${{ matrix.renderer }}
|
|
path: bin/uad_gui-*
|