From 3a6c547a06c2cf840db7c45daaf8573c7fb51461 Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 20 Nov 2023 23:15:57 +0100 Subject: [PATCH 1/4] Create rust.dev.yml --- .github/workflows/rust.dev.yml | 37 ++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/rust.dev.yml diff --git a/.github/workflows/rust.dev.yml b/.github/workflows/rust.dev.yml new file mode 100644 index 0000000..31dea70 --- /dev/null +++ b/.github/workflows/rust.dev.yml @@ -0,0 +1,37 @@ +name: Rust dev + +on: + push: + branches: [ "dev" ] + pull_request: + branches: [ "dev" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Build + run: cargo build --verbose + - name: Run tests + run: cargo test --verbose + + release: + + name: Release + runs-on: ubuntu-latest + needs: build + + steps: + - name: Download artifact + uses: actions/download-artifact@v3 + with: + name: /home/runner/work/pet_the_cat_gui/pet_the_cat_gui/target/debug/ + - name: Test artifact download + run: ls -R + From b3767b33148374e398bad23c43cf45d51dee4e8a Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 20 Nov 2023 23:48:44 +0100 Subject: [PATCH 2/4] Update rust.dev.yml --- .github/workflows/rust.dev.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.dev.yml b/.github/workflows/rust.dev.yml index 31dea70..601151a 100644 --- a/.github/workflows/rust.dev.yml +++ b/.github/workflows/rust.dev.yml @@ -11,7 +11,6 @@ env: jobs: build: - runs-on: ubuntu-latest steps: @@ -20,9 +19,13 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: pet-the-cat-gui_artifact + path: /home/runner/work/pet_the_cat_gui/pet_the_cat_gui/target/debug/pet_the_cat_gui release: - name: Release runs-on: ubuntu-latest needs: build @@ -31,7 +34,7 @@ jobs: - name: Download artifact uses: actions/download-artifact@v3 with: - name: /home/runner/work/pet_the_cat_gui/pet_the_cat_gui/target/debug/ + name: pet-the-cat-gui_artifact - name: Test artifact download run: ls -R From 9464ffbfb24d1dc8628929f159be29ec04cdcbfa Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 20 Nov 2023 23:58:55 +0100 Subject: [PATCH 3/4] Update rust.yml --- .github/workflows/rust.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0a1f90b..83c8e0e 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,26 +11,28 @@ env: jobs: build: - + name: Build runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + run: cargo build --release --verbose + - name: Upload artifact + uses: actions/upload-artifact@v3 + with: + name: pet-the-cat-gui_artifact + path: /home/runner/work/pet_the_cat_gui/pet_the_cat_gui/target/release/pet_the_cat_gui release: - name: Release runs-on: ubuntu-latest needs: build steps: - - name: Test artifact download - run: ls -R - name: Download artifact uses: actions/download-artifact@v3 with: - name: pet_the_cat_gui + name: pet-the-cat-gui_artifact + - name: Test artifact download + run: ls -R From 71d5a73cb9a799aceab174cf2ce3c188f437179d Mon Sep 17 00:00:00 2001 From: Tom Date: Mon, 20 Nov 2023 23:59:31 +0100 Subject: [PATCH 4/4] Update rust.dev.yml --- .github/workflows/rust.dev.yml | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/.github/workflows/rust.dev.yml b/.github/workflows/rust.dev.yml index 601151a..cb57710 100644 --- a/.github/workflows/rust.dev.yml +++ b/.github/workflows/rust.dev.yml @@ -11,6 +11,7 @@ env: jobs: build: + name: Build runs-on: ubuntu-latest steps: @@ -19,22 +20,4 @@ jobs: run: cargo build --verbose - name: Run tests run: cargo test --verbose - - name: Upload artifact - uses: actions/upload-artifact@v3 - with: - name: pet-the-cat-gui_artifact - path: /home/runner/work/pet_the_cat_gui/pet_the_cat_gui/target/debug/pet_the_cat_gui - - release: - name: Release - runs-on: ubuntu-latest - needs: build - - steps: - - name: Download artifact - uses: actions/download-artifact@v3 - with: - name: pet-the-cat-gui_artifact - - name: Test artifact download - run: ls -R