Skip to content

Commit 1da917e

Browse files
authored
chore: update dependencies + minor changes (#212)
* fix: bump checkout action to v4 and install libX11 on linux before running tests * migrate to dtolnays rust setup * update the apt package before installing * dismiss the caching action usages * fix deprecated upload-artifact action * chore: update clap to 4.5
1 parent aae8041 commit 1da917e

File tree

9 files changed

+289
-597
lines changed

9 files changed

+289
-597
lines changed

.github/workflows/build.yml

+24-26
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
name: Build
77
on:
88
push:
9-
branches: [ '*' ]
9+
branches: ["*"]
1010
paths-ignore:
1111
- "**/docs/**"
1212
- "**.md"
1313
pull_request:
14-
branches: [ main ]
14+
branches: [main]
1515
paths-ignore:
1616
- "**/docs/**"
1717
- "**.md"
@@ -23,93 +23,91 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
26-
version: [ 'macos-latest', 'ubuntu-latest']
26+
version: ["macos-latest", "ubuntu-latest"]
2727
runs-on: ${{ matrix.version }}
2828
steps:
29-
- uses: actions/checkout@v2
29+
- uses: actions/checkout@v4
3030
- name: setup | rust
31-
uses: actions-rs/toolchain@v1
31+
uses: dtolnay/rust-toolchain@stable
3232
with:
3333
toolchain: stable
3434
default: true
3535
profile: minimal
3636
components: clippy, rustfmt
37-
- uses: Swatinem/rust-cache@v1
3837
- run: cargo check
3938

4039
lint:
4140
name: lint
42-
needs: check
4341
strategy:
4442
fail-fast: false
4543
matrix:
46-
version: [ 'macos-latest', 'ubuntu-latest']
44+
version: ["macos-latest", "ubuntu-latest"]
4745
cargo-cmd:
4846
- fmt --all -- --check
4947
- clippy --all-targets --all-features -- -D warnings
5048
runs-on: ${{ matrix.version }}
5149
steps:
52-
- uses: actions/checkout@v2
50+
- uses: actions/checkout@v4
5351
- name: setup | rust
54-
uses: actions-rs/toolchain@v1
52+
uses: dtolnay/rust-toolchain@stable
5553
with:
5654
toolchain: stable
5755
default: true
5856
profile: minimal
5957
components: clippy, rustfmt
60-
- uses: Swatinem/rust-cache@v1
6158
- run: cargo ${{ matrix['cargo-cmd'] }}
6259

6360
tests:
6461
name: test
65-
needs: check
6662
strategy:
6763
fail-fast: false
6864
matrix:
69-
version: [ 'macos-latest', 'ubuntu-latest']
70-
rust: [ nightly, stable ]
65+
version: ["macos-latest", "ubuntu-latest"]
66+
rust: [nightly, stable]
7167
runs-on: ${{ matrix.version }}
7268
continue-on-error: ${{ matrix.rust == 'nightly' }}
7369
steps:
74-
- uses: actions/checkout@v2
70+
- uses: actions/checkout@v4
7571
- name: setup | rust
76-
uses: actions-rs/toolchain@v1
72+
uses: dtolnay/rust-toolchain@stable
7773
with:
7874
toolchain: ${{ matrix.rust }}
7975
default: true
8076
profile: minimal
81-
- uses: Swatinem/rust-cache@v1
77+
- if: ${{ matrix.version == 'ubuntu-latest' }}
78+
name: install libX11-devel for libX11
79+
run: |
80+
sudo apt-get update
81+
sudo apt-get install -y libx11-dev
8282
- name: cargo test
83-
run: cargo test --all --locked -- -Z unstable-options
83+
run: cargo test --all --locked
8484

8585
pkg-deb:
8686
name: binary package .deb
87-
needs: check
87+
needs: tests
8888
runs-on: ubuntu-latest
8989
steps:
90-
- uses: actions/checkout@v2
90+
- uses: actions/checkout@v4
9191
- name: build .deb file
9292
uses: sassman/rust-deb-builder@v1
9393
- name: Archive deb artifact
94-
uses: actions/upload-artifact@v2
94+
uses: actions/upload-artifact@v4
9595
with:
9696
name: t-rec-amd64-static.deb
9797
path: target/x86_64-unknown-linux-musl/debian/t-rec*.deb
9898

9999
audit:
100100
name: security audit
101-
needs: check
102101
runs-on: macos-latest
103102
steps:
104-
- uses: actions/checkout@v2
103+
- uses: actions/checkout@v4
105104
- name: setup | rust
106-
uses: actions-rs/toolchain@v1
105+
uses: dtolnay/rust-toolchain@stable
107106
with:
108107
toolchain: stable
109108
default: true
110109
profile: minimal
111-
- uses: Swatinem/rust-cache@v1
112110
- name: audit
113111
uses: actions-rs/audit-check@v1
114112
with:
115-
token: ${{ secrets.GITHUB_TOKEN }}
113+
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/deploy.yml

+6-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
name: Deploy
22
on:
33
push:
4-
tags:
5-
- 'v[0-9]+.[0-9]+.[0-9]+'
4+
tags:
5+
- "v[0-9]+.[0-9]+.[0-9]+"
66
paths-ignore:
77
- "**/docs/**"
88
- "**.md"
@@ -17,14 +17,13 @@ jobs:
1717
needs: [doing-a-build]
1818
runs-on: macos-latest
1919
steps:
20-
- uses: actions/checkout@v2
20+
- uses: actions/checkout@v4
2121
- name: setup | rust
22-
uses: actions-rs/toolchain@v1
22+
uses: dtolnay/rust-toolchain@stable
2323
with:
2424
toolchain: stable
2525
default: true
2626
profile: minimal
27-
- uses: Swatinem/rust-cache@v1
2827
- uses: katyo/publish-crates@v1
2928
with:
3029
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
@@ -46,14 +45,13 @@ jobs:
4645
needs: [publish]
4746
runs-on: ubuntu-latest
4847
steps:
49-
- uses: actions/checkout@v2
48+
- uses: actions/checkout@v4
5049
- name: setup | rust
51-
uses: actions-rs/toolchain@v1
50+
uses: dtolnay/rust-toolchain@stable
5251
with:
5352
toolchain: stable
5453
default: true
5554
profile: minimal
56-
- uses: Swatinem/rust-cache@v1
5755
- name: Get version from tag
5856
id: tag_name
5957
run: echo ::set-output name=current_version::${GITHUB_REF#refs/tags/v}

.github/workflows/release-binary-assets.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ jobs:
2121
cross: false
2222
binName: t-rec
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v4
2525
- name: Setup Rust
26-
uses: actions-rs/toolchain@v1
26+
uses: dtolnay/rust-toolchain@stable
2727
with:
2828
toolchain: stable
2929
target: ${{ matrix.target }}
3030
override: true
31-
- uses: Swatinem/rust-cache@v1
3231
- name: Build
3332
uses: actions-rs/cargo@v1
3433
with:
@@ -65,7 +64,7 @@ jobs:
6564
name: binary package .deb
6665
runs-on: ubuntu-latest
6766
steps:
68-
- uses: actions/checkout@v2
67+
- uses: actions/checkout@v4
6968
- name: build .deb file
7069
env:
7170
TARGET: x86_64-unknown-linux-musl
@@ -87,4 +86,3 @@ jobs:
8786
omitBodyDuringUpdate: true
8887
omitNameDuringUpdate: true
8988
omitPrereleaseDuringUpdate: true
90-

0 commit comments

Comments
 (0)