Skip to content

Commit

Permalink
Try to use chatgpt
Browse files Browse the repository at this point in the history
  • Loading branch information
Fanda Vacek committed Dec 20, 2024
1 parent 8933a15 commit e0a4669
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
name: Rust
name: Rust Build and Artifact Creation

on:
push:
branches: [ "master", "win-build" ]
branches:
- main
- win-build
pull_request:
branches: [ "master" ]

env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
branches:
- main

jobs:
build:
Expand All @@ -18,26 +17,27 @@ jobs:
target:
ubuntu-latest: x86_64-unknown-linux-gnu
windows-latest: x86_64-pc-windows-msvc
toolchain:
- channel: stable
cargo_args: --verbose --all-targets
clippy_args: ""
- channel: nightly
cargo_args: --verbose --all-targets --all-features
clippy_args: --allow clippy::needless_lifetimes

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- name: Setup toolchain
run: >
rustup update ${{ matrix.toolchain.channel }} &&
rustup default ${{ matrix.toolchain.channel }} &&
rustup component add clippy
- name: Clippy
run: cargo clippy ${{ matrix.toolchain.cargo_args }} -- ${{matrix.toolchain.clippy_args}}
- name: Build
run: cargo build ${{ matrix.toolchain.cargo_args }}
- name: Run tests
run: cargo test ${{ matrix.toolchain.cargo_args }} -- --test-threads=1
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Install target
run: rustup target add ${{ matrix.target }}

- name: Build project
run: cargo build --release --target ${{ matrix.target }}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-binary
path: target/${{ matrix.target }}/release/

0 comments on commit e0a4669

Please sign in to comment.