From 84d3df665079f8473b28f6aa8b56dbf0dcb1685b Mon Sep 17 00:00:00 2001 From: Learturely Date: Fri, 29 Nov 2024 13:43:24 +0800 Subject: [PATCH 1/2] Update rust.yml --- .github/workflows/rust.yml | 49 +++++++++++++++++++++++++++++++++++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 99a26d0..5862edc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,9 +17,9 @@ name: Rust on: push: - branches: [ "main", "newsign" ] + branches: [ "main" ] pull_request: - branches: [ "main", "newsign" ] + branches: [ "main" ] env: CARGO_TERM_COLOR: always @@ -39,8 +39,51 @@ jobs: with: toolchain: nightly override: true - components: rustfmt, clippy + components: clippy - name: Run cargo check uses: actions-rs/cargo@v1 with: command: check + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + build: + if: true + needs: [ check ] + strategy: + fail-fast: false + matrix: + include: + - { os: ubuntu-latest } + - { os: windows-2022 } + - { os: macos-12 } + name: ${{ format('{0}', matrix.os) }} + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2 + - name: Install libdbus-1-dev + if: ${{ matrix.os == 'ubuntu-latest' }} + run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev + - name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + - name: Run cargo build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --all-features + - name: Upload artifact + if: ${{ matrix.os != 'windows-2022' }} + uses: actions/upload-artifact@v4 + with: + name: '${{ matrix.os }}' + path: '${{ github.workspace }}/target/release/*sign' + - name: Upload artifact (Windows) + if: ${{ matrix.os == 'windows-2022' }} + uses: actions/upload-artifact@v4 + with: + name: '${{ matrix.os }}' + path: '${{ github.workspace }}/target/release/*sign.exe' From b2b10cb6209164ebec0a4ed713fe3caba545a116 Mon Sep 17 00:00:00 2001 From: Learturely Date: Fri, 29 Nov 2024 13:49:00 +0800 Subject: [PATCH 2/2] Update rust.yml --- .github/workflows/rust.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5862edc..5731d5b 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -62,6 +62,8 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 + with: + submodules: true - name: Install libdbus-1-dev if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt update && sudo apt-get install -yqq libdbus-1-dev