Skip to content

Commit

Permalink
CI. Cargo.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
pwalski committed Oct 24, 2023
1 parent 8c321b3 commit f3be99b
Show file tree
Hide file tree
Showing 3 changed files with 2,424 additions and 42 deletions.
70 changes: 29 additions & 41 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,47 +12,35 @@ env:
CARGO_TERM_COLOR: always

jobs:
build:
test:
name: CI

runs-on: windows-latest

steps:
- name: Check lockfile
uses: actions-rs/cargo@v1
with:
command: tree
args: --locked

- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

- uses: actions/checkout@v3

- name: Build
run: cargo build --verbose

- name: Check clippy lints
uses: actions-rs/cargo@v1
with:
command: Clippy
args: --all-targets --all-features --workspace -- -D warnings

- name: Run tests
run: cargo test --verbose

- uses: actions/checkout@v3

- name: Build Release
if: startsWith(github.ref, 'refs/tags/')
run: cargo build --release

- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: target/release/*.exe
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-rel-v') }}
- uses: actions/checkout@v4

- uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.71.0
components: clippy, rustfmt

- run: cargo tree --locked

- run: cargo fmt --all -- --check

- run: cargo clippy --all-targets --all-features --workspace -- -D warnings

- run: cargo test --all-features --workspace

- name: Release Build
if: startsWith(github.ref, 'refs/tags/')
run: cargo build --workspace --release

- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
files: target/release/*.exe
prerelease: ${{ startsWith(github.ref, 'refs/tags/pre-rel-v') }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock
# Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk
Expand Down
Loading

0 comments on commit f3be99b

Please sign in to comment.