Skip to content

Commit

Permalink
Merge pull request #395 from str4d/ci-fixes
Browse files Browse the repository at this point in the history
CI fixes required for 0.9.2 release
  • Loading branch information
str4d authored Jun 13, 2023
2 parents 267f383 + 6bb277a commit 5b0736f
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 124 deletions.
21 changes: 5 additions & 16 deletions .github/workflows/audits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true

- uses: dtolnay/rust-toolchain@stable
id: toolchain
- run: rustup override set ${{steps.toolchain.outputs.name}}
- name: Install cargo-vet
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-vet

- name: Run cargo vet --locked
uses: actions-rs/cargo@v1
with:
command: vet
args: --locked
run: cargo install cargo-vet
- run: cargo vet --locked
86 changes: 14 additions & 72 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,11 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- run: cargo fetch
- name: Build tests
uses: actions-rs/cargo@v1
with:
command: build
args: --all --verbose --exclude rage --all-features --tests
run: cargo build --workspace --verbose --exclude rage --all-features --tests
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all --verbose --exclude rage --all-features
run: cargo test --workspace --verbose --exclude rage --all-features

build:
name: Build target ${{ matrix.target }}
Expand All @@ -41,55 +28,33 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
override: true
- name: Add target
run: rustup target add ${{ matrix.target }}
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch
- run: cargo fetch
- name: Build for target
working-directory: ./age
run: cargo build --verbose --no-default-features --target ${{ matrix.target }}

bitrot:
name: Bitrot
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
override: true
- name: Install linux build dependencies
run: sudo apt install libfuse-dev
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
args: --tests --examples --benches --all-features
- run: cargo check --all-targets --all-features

clippy:
name: Clippy (1.59.0)
name: Clippy (MSRV)
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
components: clippy
override: true
- name: Install linux build dependencies
run: sudo apt install libfuse-dev
- name: Clippy check
uses: actions-rs/clippy-check@v1
with:
name: Clippy (1.59.0)
name: Clippy (MSRV)
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features --all-targets -- -D warnings

Expand All @@ -99,10 +64,9 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable
id: toolchain
- run: rustup override set ${{steps.toolchain.outputs.name}}
- name: Install linux build dependencies
run: sudo apt install libfuse-dev
- name: Generate coverage report
Expand All @@ -118,39 +82,17 @@ jobs:
doc-links:
name: Intra-doc links
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
override: true
- name: cargo fetch
uses: actions-rs/cargo@v1
with:
command: fetch

# Ensure intra-documentation links all resolve correctly
# Requires #![deny(intra_doc_link_resolution_failure)] in crates.
- run: cargo fetch
# Requires #![deny(rustdoc::broken_intra_doc_links)] in crates.
- name: Check intra-doc links
uses: actions-rs/cargo@v1
with:
command: doc
args: --all --exclude rage --all-features --document-private-items
run: cargo doc --all --exclude rage --all-features --document-private-items

fmt:
name: Rustfmt
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
components: rustfmt
override: true
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
4 changes: 0 additions & 4 deletions .github/workflows/interop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ jobs:
--data '{"state": "pending", "target_url": "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}", "description": "In progress", "context": "Interoperability tests / Build rage"}'
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.59.0
override: true
- name: cargo build
run: cargo build --release --features unstable
working-directory: ./rage
Expand Down
47 changes: 16 additions & 31 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ jobs:
name: [linux, armv7, arm64, windows, macos]
include:
- name: linux
os: ubuntu-18.04
os: ubuntu-20.04
build_deps: >
libfuse-dev
build_flags: --features mount
archive_name: rage.tar.gz
asset_suffix: x86_64-linux.tar.gz

- name: armv7
os: ubuntu-18.04
os: ubuntu-20.04
target: armv7-unknown-linux-gnueabihf
build_deps: >
gcc-arm-linux-gnueabihf
Expand All @@ -40,7 +40,7 @@ jobs:
asset_suffix: armv7-linux.tar.gz

- name: arm64
os: ubuntu-18.04
os: ubuntu-20.04
target: aarch64-unknown-linux-gnu
build_deps: >
gcc-aarch64-linux-gnu
Expand All @@ -63,13 +63,11 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
toolchain: stable
override: true
- name: Add target
run: rustup target add ${{ matrix.target }}
if: matrix.target != ''
targets: ${{ matrix.target }}
- run: rustup override set ${{steps.toolchain.outputs.name}}

- name: Install linux build dependencies
run: sudo apt install ${{ matrix.build_deps }}
Expand Down Expand Up @@ -115,7 +113,7 @@ jobs:

deb:
name: Debian ${{ matrix.name }}
runs-on: ubuntu-18.04
runs-on: ubuntu-20.04
strategy:
matrix:
name: [linux, linux-musl, armv7, armv7-musl, arm64, arm64-musl]
Expand Down Expand Up @@ -170,17 +168,13 @@ jobs:

steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
id: toolchain
with:
toolchain: stable
override: true
- name: Add target
run: rustup target add ${{ matrix.target }}
targets: ${{ matrix.target }}
- run: rustup override set ${{steps.toolchain.outputs.name}}
- name: cargo install cargo-deb
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-deb
run: cargo install cargo-deb

- name: Install build dependencies
run: sudo apt install ${{ matrix.build_deps }}
Expand All @@ -197,26 +191,17 @@ jobs:
working-directory: ./rage

- name: Generate completions
uses: actions-rs/cargo@v1
with:
command: run
args: --example generate-completions
run: cargo run --example generate-completions

- name: Generate manpages
uses: actions-rs/cargo@v1
with:
command: run
args: --example generate-docs
run: cargo run --example generate-docs

- name: Update Debian package config for cross-compile
run: sed -i '/\/rage-mount/d' rage/Cargo.toml
if: matrix.name != 'linux'

- name: cargo deb
uses: actions-rs/cargo@v1
with:
command: deb
args: --package rage --no-build --target ${{ matrix.target }} ${{ matrix.deb_flags }}
run: cargo deb --package rage --no-build --target ${{ matrix.target }} ${{ matrix.deb_flags }}

- name: Upload Debian package to release
uses: svenstaro/upload-release-action@2.6.1
Expand Down
1 change: 1 addition & 0 deletions rage/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ to 1.0.0 are beta releases.
the `PINENTRY_PROGRAM` environment variable. It accepts either a binary name
or a path. Setting this to the empty string will disable `pinentry` usage and
fall back to the CLI interface.
- Linux release binaries are now built using Ubuntu 20.04.

## [0.9.1] - 2023-03-24
### Added
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

3 changes: 3 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[toolchain]
channel = "1.59.0"
components = ["clippy", "rustfmt"]

0 comments on commit 5b0736f

Please sign in to comment.