Skip to content

Commit

Permalink
ok
Browse files Browse the repository at this point in the history
  • Loading branch information
orf committed Dec 16, 2024
1 parent 0513569 commit 643da28
Showing 1 changed file with 10 additions and 65 deletions.
75 changes: 10 additions & 65 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,60 +9,6 @@ on:
name: CI

jobs:
# build_and_test:
# name: Rust project
# runs-on: ${{ matrix.os }}
# strategy:
# fail-fast: false
# matrix:
# include:
# - os: macOS-latest
# bin: gping
# target: aarch64-apple-darwin
# extension: .tar.gz
# - os: windows-latest
# bin: gping.exe
# name: gping-Windows-x86_64.zip
# env:
# RUST_BACKTRACE: "1"
# steps:
# - uses: actions/checkout@v4
#
# - name: Install Rust
# uses: dtolnay/rust-toolchain@stable
# - uses: Swatinem/rust-cache@v2
# with:
# prefix-key: standard-build-${{ matrix.os }}-
#
# - name: Run tests
# run: cargo test
#
# - name: Run
# run: cargo run -- --help
#
# - name: Build release
# if: startsWith(github.ref, 'refs/tags/')
# run: cargo build --release
# - name: Package
# if: startsWith(github.ref, 'refs/tags/')
# shell: bash
# run: |
# strip target/release/${{ matrix.bin }}
# cd target/release
# if [[ "${{ matrix.os }}" == "windows-latest" ]]
# then
# 7z a ../../${{ matrix.name }} ${{ matrix.bin }}
# else
# tar czvf ../../${{ matrix.name }} ${{ matrix.bin }}
# fi
# cd -
# - name: Archive binaries
# uses: actions/upload-artifact@v4
# if: startsWith(github.ref, 'refs/tags/')
# with:
# name: build-${{ matrix.name }}
# path: ${{ matrix.name }}

cross_builds:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
Expand Down Expand Up @@ -90,8 +36,9 @@ jobs:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
cache-on-failure: false
target: ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2
Expand Down Expand Up @@ -145,22 +92,20 @@ jobs:
- uses: actions/setup-python@v5

- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
prefix-key: checks-build-
cache-on-failure: false
components: rustfmt,clippy

- name: Run cargo fmt
if: success() || failure()
run: cargo fmt --all -- --check
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1

- name: Run cargo check
if: success() || failure()
run: cargo check

- if: success() || failure()
run: cargo clippy --all-targets --all-features -- -D warnings
run: cargo clippy --all-targets --all-features --locked -- -D

- uses: pre-commit/[email protected]
- if: success() || failure()
uses: pre-commit/[email protected]

0 comments on commit 643da28

Please sign in to comment.