From 6813fdd513298e5551083cf859dacdd70c943533 Mon Sep 17 00:00:00 2001 From: Yannick Funk Date: Mon, 6 Sep 2021 16:28:33 +0200 Subject: [PATCH 1/5] Create rust.yaml --- .github/workflows/rust.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/rust.yaml diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml new file mode 100644 index 00000000..5272934b --- /dev/null +++ b/.github/workflows/rust.yaml @@ -0,0 +1,24 @@ +name: Rust build and test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + - name: Release Build + run: cargo build --release --verbose From 881351578643f6664c16f7e378e67edb0193a528 Mon Sep 17 00:00:00 2001 From: Yannick Funk Date: Mon, 6 Sep 2021 16:30:40 +0200 Subject: [PATCH 2/5] Change branch --- .github/workflows/rust.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 5272934b..2e0a4086 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -2,9 +2,9 @@ name: Rust build and test on: push: - branches: [ master ] + branches: [ unit-tests ] pull_request: - branches: [ master ] + branches: [ unit-tests ] env: CARGO_TERM_COLOR: always From fe085ef1000de6b868750738f4a50cc986d496d3 Mon Sep 17 00:00:00 2001 From: Yannick Funk Date: Mon, 6 Sep 2021 16:40:30 +0200 Subject: [PATCH 3/5] Change to nightly --- .github/workflows/rust.yaml | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 2e0a4086..7f1c4cb7 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -10,15 +10,32 @@ env: CARGO_TERM_COLOR: always jobs: - build: - + check: + name: Rust project runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose - - name: Release Build - run: cargo build --release --verbose + - uses: actions/checkout@v2 + - name: Install latest nightly + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + components: rustfmt, clippy + + # `cargo check` command here will use installed `nightly` + # as it is set as an "override" for current directory + + - name: Run cargo build + uses: actions-rs/cargo@v1 + with: + command: build + + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test + + - name: Run cargo build --release + uses: actions-rs/cargo@v1 + with: + command: build --release From d8d0d93a21eb7e53ef7d0d3cc24bb9b0422a19d6 Mon Sep 17 00:00:00 2001 From: Yannick Funk Date: Mon, 6 Sep 2021 17:13:07 +0200 Subject: [PATCH 4/5] Remove release build --- .github/workflows/rust.yaml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 7f1c4cb7..2e88a5d1 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -22,9 +22,6 @@ jobs: override: true components: rustfmt, clippy - # `cargo check` command here will use installed `nightly` - # as it is set as an "override" for current directory - - name: Run cargo build uses: actions-rs/cargo@v1 with: @@ -33,9 +30,4 @@ jobs: - name: Run cargo test uses: actions-rs/cargo@v1 with: - command: test - - - name: Run cargo build --release - uses: actions-rs/cargo@v1 - with: - command: build --release + command: test \ No newline at end of file From 602a65f809aed7e7bfbabe9cb28ac4edb388b4c9 Mon Sep 17 00:00:00 2001 From: Yannick Funk Date: Tue, 7 Sep 2021 14:48:46 +0200 Subject: [PATCH 5/5] Change branch to master --- .github/workflows/rust.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yaml b/.github/workflows/rust.yaml index 2e88a5d1..4386b19f 100644 --- a/.github/workflows/rust.yaml +++ b/.github/workflows/rust.yaml @@ -2,9 +2,9 @@ name: Rust build and test on: push: - branches: [ unit-tests ] + branches: [ master ] pull_request: - branches: [ unit-tests ] + branches: [ master ] env: CARGO_TERM_COLOR: always @@ -30,4 +30,4 @@ jobs: - name: Run cargo test uses: actions-rs/cargo@v1 with: - command: test \ No newline at end of file + command: test