Merge pull request #282 from luigi311/binstall

CI: Use binstall, Always run tests/linux
This commit is contained in:
Igor Katson 2025-03-08 10:39:15 +00:00 committed by GitHub
commit e4595a76c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 33 additions and 4 deletions

View file

@ -16,6 +16,7 @@ jobs:
platform: [linux/arm/v7, linux/amd64, linux/arm64]
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: builder1
@ -94,7 +95,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ikatson/rqbit
${{ vars.DOCKERHUB_USERNAME }}/rqbit, enable=${{ vars.DOCKERHUB_USERNAME != '' }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
@ -119,6 +120,8 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: "${{ vars.DOCKERHUB_USERNAME != '' }}"
id: docker_login
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
@ -127,7 +130,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
push: ${{ steps.docker_login.outcome == 'success' }}
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64,linux/arm/v7
context: target/cross/

View file

@ -14,11 +14,16 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Install Binstall
uses: cargo-bins/cargo-binstall@main
- name: install Tauri
run: cargo install tauri-cli --profile dev
run: cargo binstall tauri-cli --no-confirm
- name: npm install (desktop)
working-directory: desktop
run: npm install
- name: npm install (librqbit/webui)
working-directory: crates/librqbit/webui
run: npm install
@ -28,6 +33,7 @@ jobs:
run:
rustup target add aarch64-apple-darwin && rustup target add x86_64-apple-darwin &&
cargo tauri build --target universal-apple-darwin --ci
- uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
@ -42,6 +48,7 @@ jobs:
cargo build --profile release-github --target x86_64-apple-darwin &&
cargo build --profile release-github --target aarch64-apple-darwin &&
lipo ./target/x86_64-apple-darwin/release-github/rqbit ./target/aarch64-apple-darwin/release-github/rqbit -create -output ./target/artifacts/rqbit-osx-universal
- uses: softprops/action-gh-release@v1
with:
generate_release_notes: true

View file

@ -13,11 +13,17 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Install Binstall
uses: cargo-bins/cargo-binstall@main
- name: install Tauri
run: cargo install tauri-cli --profile dev
run: cargo binstall tauri-cli --no-confirm
- name: npm install (desktop)
working-directory: desktop
run: npm install
- name: npm install (librqbit/webui)
working-directory: crates/librqbit/webui
run: npm install
@ -25,6 +31,7 @@ jobs:
- name: cargo tauri build
working-directory: desktop
run: cargo tauri build --ci
- uses: softprops/action-gh-release@v1
with:
generate_release_notes: true
@ -33,6 +40,7 @@ jobs:
- name: Build release
run: cargo build --profile release-github
- uses: softprops/action-gh-release@v1
with:
generate_release_notes: true

View file

@ -19,13 +19,19 @@ jobs:
- name: rustup toolchain install ${{ matrix.rust_version }}
run: |
rustup toolchain install ${{ matrix.rust_version }}
- uses: actions/checkout@v4
- run: rustup override set ${{ matrix.rust_version }}
- run: rustup component add rustfmt
- name: cargo check
run: cargo check
- name: cargo fmt --check
run: cargo fmt --check
test:
strategy:
matrix:
@ -33,16 +39,21 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install stable --profile minimal
- uses: Swatinem/rust-cache@v2
with:
prefix-key: v1
- name: Run tests
if: ${{ matrix.os == 'windows-latest' }}
run: cargo test --workspace
- name: Run tests
if: ${{ matrix.os == 'macos-latest' }}
run: ulimit -n unlimited && cargo test --workspace
- name: Run tests
if: ${{ matrix.os == 'ubuntu-latest' }}
run: cargo test