mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-23 05:34:57 +02:00
Merge branch 'ClementTsang:master' into master
This commit is contained in:
commit
0b0c1b00d3
24
.github/workflows/build_releases.yml
vendored
24
.github/workflows/build_releases.yml
vendored
@ -282,13 +282,14 @@ jobs:
|
|||||||
path: release
|
path: release
|
||||||
|
|
||||||
build-deb:
|
build-deb:
|
||||||
name: "Build Debian installers"
|
name: "Build Debian .deb software packages"
|
||||||
runs-on: "ubuntu-20.04"
|
runs-on: "ubuntu-20.04"
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
info:
|
info:
|
||||||
- { target: "x86_64-unknown-linux-gnu", cross: false, dpkg: amd64 }
|
- { 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",
|
target: "aarch64-unknown-linux-gnu",
|
||||||
cross: true,
|
cross: true,
|
||||||
@ -301,6 +302,18 @@ jobs:
|
|||||||
dpkg: armhf,
|
dpkg: armhf,
|
||||||
container: "ghcr.io/clementtsang/cargo-deb-armv7-unknown-linux-gnueabihf",
|
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:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -356,10 +369,17 @@ jobs:
|
|||||||
VERSION=${{ matrix.info.dpkg }}
|
VERSION=${{ matrix.info.dpkg }}
|
||||||
mv $TMP_NAME $(echo $TMP_NAME | sed "s/-$VERSION//")
|
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
|
- name: Verify Debian release
|
||||||
id: verify
|
id: verify
|
||||||
run: |
|
run: |
|
||||||
DEB_FILE=$(find bottom_*.deb)
|
DEB_FILE=$(find bottom*_*.deb)
|
||||||
dpkg -I $DEB_FILE
|
dpkg -I $DEB_FILE
|
||||||
dpkg -I $DEB_FILE | grep ${{ matrix.info.dpkg }} && echo "Found correct architecture"
|
dpkg -I $DEB_FILE | grep ${{ matrix.info.dpkg }} && echo "Found correct architecture"
|
||||||
echo "DEB_FILE=$DEB_FILE" >> $GITHUB_OUTPUT
|
echo "DEB_FILE=$DEB_FILE" >> $GITHUB_OUTPUT
|
||||||
|
10
.github/workflows/ci.yml
vendored
10
.github/workflows/ci.yml
vendored
@ -50,7 +50,7 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Check if this action should be skipped
|
- name: Check if this action should be skipped
|
||||||
id: skip_check
|
id: skip_check
|
||||||
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
|
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281 # v5.3.0
|
||||||
with:
|
with:
|
||||||
skip_after_successful_duplicate: "true"
|
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"]'
|
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 }}
|
target: ${{ matrix.info.target }}
|
||||||
|
|
||||||
- name: Enable Rust cache
|
- 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
|
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
|
||||||
with:
|
with:
|
||||||
shared-key: build-cache-${{ matrix.info.target }}
|
key: ${{ matrix.info.target }}
|
||||||
|
|
||||||
- name: Check cargo fmt
|
- name: Check cargo fmt
|
||||||
run: cargo fmt --all -- --check
|
run: cargo fmt --all -- --check
|
||||||
@ -241,10 +241,10 @@ jobs:
|
|||||||
target: ${{ matrix.info.target }}
|
target: ${{ matrix.info.target }}
|
||||||
|
|
||||||
- name: Enable Rust cache
|
- 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
|
if: ${{ github.event_name != 'pull_request' || ! github.event.pull_request.head.repo.fork }} # If it is a PR, only if not a fork
|
||||||
with:
|
with:
|
||||||
shared-key: build-cache-${{ matrix.info.target }}
|
key: ${{ matrix.info.target }}
|
||||||
|
|
||||||
- name: Check
|
- name: Check
|
||||||
uses: ClementTsang/cargo-action@v0.0.3
|
uses: ClementTsang/cargo-action@v0.0.3
|
||||||
|
14
.github/workflows/coverage.yml
vendored
14
.github/workflows/coverage.yml
vendored
@ -28,7 +28,7 @@ jobs:
|
|||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
|
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281 # v5.3.0
|
||||||
with:
|
with:
|
||||||
skip_after_successful_duplicate: "false"
|
skip_after_successful_duplicate: "false"
|
||||||
paths: '["tests/**", "src/**", ".github/workflows/coverage.yml", ".cargo/**", "Cargo.toml", "Cargo.lock", "build.rs"]'
|
paths: '["tests/**", "src/**", ".github/workflows/coverage.yml", ".cargo/**", "Cargo.toml", "Cargo.lock", "build.rs"]'
|
||||||
@ -43,9 +43,9 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
info:
|
info:
|
||||||
- { os: "ubuntu-latest" }
|
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu" }
|
||||||
- { os: "macos-12" }
|
- { os: "macos-12", target: "x86_64-apple-darwin" }
|
||||||
- { os: "windows-2019" }
|
- { os: "windows-2019", target: "x86_64-pc-windows-msvc" }
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
@ -56,8 +56,10 @@ jobs:
|
|||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
|
||||||
- name: Enable Rust cache
|
- 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
|
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
|
- name: Install cargo-llvm-cov
|
||||||
run: |
|
run: |
|
||||||
@ -66,7 +68,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate code coverage
|
- name: Generate code coverage
|
||||||
run: |
|
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
|
- name: Upload to codecov.io
|
||||||
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # 3.1.1
|
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70 # 3.1.1
|
||||||
|
2
.github/workflows/test-docs.yml
vendored
2
.github/workflows/test-docs.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
|||||||
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
should_skip: ${{ steps.skip_check.outputs.should_skip }}
|
||||||
steps:
|
steps:
|
||||||
- id: skip_check
|
- id: skip_check
|
||||||
uses: fkirc/skip-duplicate-actions@f11521568414503656a5af807dc3018c012552c4 # v5.2.0
|
uses: fkirc/skip-duplicate-actions@12aca0a884f6137d619d6a8a09fcc3406ced5281 # v5.3.0
|
||||||
with:
|
with:
|
||||||
skip_after_successful_duplicate: "true"
|
skip_after_successful_duplicate: "true"
|
||||||
paths: '["docs/**", ".github/workflows/docs.yml", ".github/workflows/test-docs.yml"]'
|
paths: '["docs/**", ".github/workflows/docs.yml", ".github/workflows/test-docs.yml"]'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user