Merge branch 'ClementTsang:master' into master

This commit is contained in:
Twan Stok 2023-03-13 22:05:09 +01:00 committed by GitHub
commit 0b0c1b00d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 36 additions and 14 deletions

View File

@ -282,13 +282,14 @@ jobs:
path: release
build-deb:
name: "Build Debian installers"
name: "Build Debian .deb software packages"
runs-on: "ubuntu-20.04"
strategy:
fail-fast: false
matrix:
info:
- { target: "x86_64-unknown-linux-gnu", cross: false, dpkg: amd64 }
- { target: "x86_64-unknown-linux-musl", cross: false, dpkg: amd64 }
- {
target: "aarch64-unknown-linux-gnu",
cross: true,
@ -301,6 +302,18 @@ jobs:
dpkg: armhf,
container: "ghcr.io/clementtsang/cargo-deb-armv7-unknown-linux-gnueabihf",
}
- {
target: "aarch64-unknown-linux-musl",
cross: true,
dpkg: arm64,
container: "ghcr.io/clementtsang/cargo-deb-aarch64-unknown-linux-gnu",
}
- {
target: "armv7-unknown-linux-musleabihf",
cross: true,
dpkg: armhf,
container: "ghcr.io/clementtsang/cargo-deb-armv7-unknown-linux-gnueabihf",
}
steps:
- name: Checkout repository
uses: actions/checkout@v3
@ -356,10 +369,17 @@ jobs:
VERSION=${{ matrix.info.dpkg }}
mv $TMP_NAME $(echo $TMP_NAME | sed "s/-$VERSION//")
- name: Rename if it is a musl target
if: contains(matrix.info.target, 'musl')
run: |
TMP_NAME=$(find bottom_*.deb)
mv $TMP_NAME $(echo $TMP_NAME | sed "s/bottom/bottom-musl/")
# TODO: Maybe rename version if nightly?
- name: Verify Debian release
id: verify
run: |
DEB_FILE=$(find bottom_*.deb)
DEB_FILE=$(find bottom*_*.deb)
dpkg -I $DEB_FILE
dpkg -I $DEB_FILE | grep ${{ matrix.info.dpkg }} && echo "Found correct architecture"
echo "DEB_FILE=$DEB_FILE" >> $GITHUB_OUTPUT

View File

@ -50,7 +50,7 @@ jobs:
steps:
- name: Check if this action should be skipped
id: skip_check
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281 # v5.3.0
with:
skip_after_successful_duplicate: "true"
paths: '[".cargo/**", ".github/workflows/ci.yml", "sample_configs/**", "src/**", "tests/**", "build.rs", "Cargo.lock", "Cargo.toml", "clippy.toml", "rustfmt.toml", "Cross.toml"]'
@ -97,10 +97,10 @@ jobs:
target: ${{ matrix.info.target }}
- name: Enable Rust cache
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # 2.2.0
uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # 2.2.1
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
with:
shared-key: build-cache-${{ matrix.info.target }}
key: ${{ matrix.info.target }}
- name: Check cargo fmt
run: cargo fmt --all -- --check
@ -241,10 +241,10 @@ jobs:
target: ${{ matrix.info.target }}
- name: Enable Rust cache
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # 2.2.0
uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # 2.2.1
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
with:
shared-key: build-cache-${{ matrix.info.target }}
key: ${{ matrix.info.target }}
- name: Check
uses: ClementTsang/cargo-action@v0.0.3

View File

@ -28,7 +28,7 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281 # v5.3.0
with:
skip_after_successful_duplicate: "false"
paths: '["tests/**", "src/**", ".github/workflows/coverage.yml", ".cargo/**", "Cargo.toml", "Cargo.lock", "build.rs"]'
@ -43,9 +43,9 @@ jobs:
fail-fast: false
matrix:
info:
- { os: "ubuntu-latest" }
- { os: "macos-12" }
- { os: "windows-2019" }
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu" }
- { os: "macos-12", target: "x86_64-apple-darwin" }
- { os: "windows-2019", target: "x86_64-pc-windows-msvc" }
steps:
- name: Checkout repository
uses: actions/checkout@v3
@ -56,8 +56,10 @@ jobs:
toolchain: stable
- name: Enable Rust cache
uses: Swatinem/rust-cache@359a70e43a0bb8a13953b04a90f76428b4959bb6 # 2.2.0
uses: Swatinem/rust-cache@6fd3edff6979b79f87531400ad694fb7f2c84b1f # 2.2.1
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
with:
key: ${{ matrix.info.target }}
- name: Install cargo-llvm-cov
run: |
@ -66,7 +68,7 @@ jobs:
- name: Generate code coverage
run: |
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info --locked
cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info --locked --target=${{ matrix.info.target }}
- name: Upload to codecov.io
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # 3.1.1

View File

@ -16,7 +16,7 @@ jobs:
should_skip: ${{ steps.skip_check.outputs.should_skip }}
steps:
- id: skip_check
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281 # v5.3.0
with:
skip_after_successful_duplicate: "true"
paths: '["docs/**", ".github/workflows/docs.yml", ".github/workflows/test-docs.yml"]'