summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornickelc <constantin.nickel@gmail.com>2023-02-28 12:47:49 +0100
committerGitHub <noreply@github.com>2023-02-28 06:47:49 -0500
commit17ad30e514b8f98982c36389c099a0417b0e8063 (patch)
tree4a0aee3f35283f0dcabc3471659f9b588a8c757e
parent28bf556897fe8945a72e8a1c32ceb8636ee428bb (diff)
Replace unmaintained/outdated GitHub Actions (#1317)
* Replace unmaintained/outdated GitHub Actions * Replace `actions-rs/cargo` for `cross` usage
-rw-r--r--.github/workflows/audit.yml2
-rw-r--r--.github/workflows/cd.yml41
-rw-r--r--.github/workflows/ci.yml76
-rw-r--r--.github/workflows/manual.yml12
4 files changed, 53 insertions, 78 deletions
diff --git a/.github/workflows/audit.yml b/.github/workflows/audit.yml
index 175c2c9b..c80d8116 100644
--- a/.github/workflows/audit.yml
+++ b/.github/workflows/audit.yml
@@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
index 225c5272..1c8a9061 100644
--- a/.github/workflows/cd.yml
+++ b/.github/workflows/cd.yml
@@ -39,22 +39,26 @@ jobs:
steps:
- name: Installing Rust toolchain
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
- target: ${{ matrix.job.target }}
- profile: minimal
- override: true
+ targets: ${{ matrix.job.target }}
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
+ - name: Install cross
+ if: matrix.job.use-cross
+ uses: taiki-e/install-action@v2
+ with:
+ tool: cross
- name: Cargo build
env:
MACOSX_DEPLOYMENT_TARGET: 10.7
- uses: actions-rs/cargo@v1
- with:
- command: build
- use-cross: ${{ matrix.job.use-cross }}
- args: --release --target ${{ matrix.job.target }}
+ shell: bash
+ run: |
+ if [[ "${{ matrix.job.cross }}" == "true" ]]; then
+ cross build --release --target ${{ matrix.job.target }}
+ else
+ cargo build --release --target ${{ matrix.job.target }}
+ fi
- name: Install required dependencies
shell: bash
@@ -90,22 +94,15 @@ jobs:
name: Publishing to Cargo
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@master
- - uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
- - uses: actions-rs/cargo@v1
- with:
- command: publish
- args: --token ${{ secrets.CARGO_API_KEY }} --allow-dirty
+ - uses: actions/checkout@v3
+ - uses: dtolnay/rust-toolchain@stable
+ - run: cargo publish --token ${{ secrets.CARGO_API_KEY }} --allow-dirty
bump-homebrew-formula:
runs-on: macos-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Bump Homebrew formulae
uses: dawidd6/action-homebrew-bump-formula@v3
with:
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f1824bad..e257f893 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -37,20 +37,24 @@ jobs:
use-cross: true
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
- target: ${{ matrix.job.target }}
- profile: minimal
- override: true
- - name: Unit tests
- uses: actions-rs/cargo@v1
+ targets: ${{ matrix.job.target }}
+ - name: Install cross
+ if: matrix.job.use-cross
+ uses: taiki-e/install-action@v2
with:
- command: test
- use-cross: ${{ matrix.job.use-cross }}
- args: --target ${{ matrix.job.target }} --verbose -- --nocapture
+ tool: cross
+ - name: Unit tests
+ shell: bash
+ run: |
+ if [[ "${{ matrix.job.use-cross }}" == "true" ]]; then
+ cross test --target ${{ matrix.job.target }} --verbose -- --nocapture
+ else
+ cargo test --target ${{ matrix.job.target }} --verbose -- --nocapture
+ fi
integration_tests:
name: Integration tests
@@ -65,18 +69,11 @@ jobs:
target: x86_64-unknown-linux-gnu
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
- with:
- toolchain: stable
- profile: minimal
- override: true
+ uses: dtolnay/rust-toolchain@stable
- name: Build for release
- uses: actions-rs/cargo@v1
- with:
- command: build
- args: --target ${{ matrix.target }} --release
+ run: cargo build --target ${{ matrix.target }} --release
- name: End to end tests
run: |
DELTA_BIN=target/${{ matrix.target }}/release/delta
@@ -90,54 +87,41 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
- profile: minimal
- override: true
components: rustfmt
- name: Check formatting
- uses: actions-rs/cargo@v1
- with:
- command: fmt
- args: --all -- --check
+ run: cargo fmt --all --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install Rust
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
with:
- toolchain: stable
- profile: minimal
- override: true
components: clippy
- name: Clippy Check
- uses: actions-rs/cargo@v1
- with:
- command: clippy
- args: -- -D warnings
+ run: cargo clippy -- -D warnings
coverage:
name: Code coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install stable toolchain
- uses: actions-rs/toolchain@v1
+ uses: dtolnay/rust-toolchain@stable
+ - name: Install cargo-tarpaulin
+ uses: taiki-e/install-action@v2
with:
- toolchain: stable
- override: true
+ tool: cargo-tarpaulin
- name: Run cargo-tarpaulin
- uses: actions-rs/tarpaulin@v0.1
- with:
- args: '--ignore-tests --out Lcov --output-dir target/tarpaulin'
+ run: cargo tarpaulin --ignore-tests --out Lcov --output-dir target/tarpaulin
- name: Upload to Coveralls
# upload only if push
if: ${{ github.event_name == 'push' }}
diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml
index 09afae02..d4bf570b 100644
--- a/.github/workflows/manual.yml
+++ b/.github/workflows/manual.yml
@@ -11,16 +11,10 @@ jobs:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- - uses: actions/checkout@v2
+ - uses: actions/checkout@v3
- - uses: actions-rs/toolchain@v1
- with:
- profile: minimal
- toolchain: stable
- override: true
- - uses: actions-rs/cargo@v1
- with:
- command: doc
+ - uses: dtolnay/rust-toolchain@stable
+ - run: cargo doc
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1