From 3216ebb9ca5d0e9b38b1f9b21416f827e3583915 Mon Sep 17 00:00:00 2001 From: nm17 Date: Thu, 6 Feb 2025 18:47:55 +0400 Subject: [PATCH 1/3] ci: initial prototype --- .forgejo/workflows/build.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .forgejo/workflows/build.yaml diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml new file mode 100644 index 0000000..958e786 --- /dev/null +++ b/.forgejo/workflows/build.yaml @@ -0,0 +1,31 @@ +name: Cargo Build & Test + +on: + push: + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + build_and_test: + name: Rust project - latest + runs-on: ubuntu-latest + strategy: + matrix: + toolchain: + - nightly + steps: + - uses: actions/checkout@v4 + - run: ls . && pwd && whoami + shell: bash + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/ + key: ${{ runner.os }}-cargo + - uses: https://github.com/dtolnay/rust-toolchain@stable + with: + toolchain: nightly + + - run: cargo test --all-features \ No newline at end of file -- 2.48.1 From 607f9dd88d3321383d246f611422f7193b3ba93f Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Feb 2025 20:29:27 +0300 Subject: [PATCH 2/3] ci: change runs-on --- .forgejo/workflows/build.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 958e786..0ba33fd 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -10,7 +10,7 @@ env: jobs: build_and_test: name: Rust project - latest - runs-on: ubuntu-latest + runs-on: node-bookworm strategy: matrix: toolchain: -- 2.48.1 From da86396f67b37663fb4cc0b4a3ea0187ae5bca41 Mon Sep 17 00:00:00 2001 From: nm17 Date: Sun, 9 Feb 2025 20:37:34 +0300 Subject: [PATCH 3/3] ci: fix cache hopefully --- .forgejo/workflows/build.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/build.yaml b/.forgejo/workflows/build.yaml index 0ba33fd..c0297d1 100644 --- a/.forgejo/workflows/build.yaml +++ b/.forgejo/workflows/build.yaml @@ -19,7 +19,8 @@ jobs: - uses: actions/checkout@v4 - run: ls . && pwd && whoami shell: bash - - uses: actions/cache@v4 + - uses: actions/cache/restore@v4 + id: cargo-cache-restore with: path: | ~/.cargo/ @@ -27,5 +28,9 @@ jobs: - uses: https://github.com/dtolnay/rust-toolchain@stable with: toolchain: nightly - + - uses: actions/cache/save@v4 + with: + path: | + ~/.cargo/ + key: ${{ steps.cargo-cache-restore.outputs.cache-primary-key }} - run: cargo test --all-features \ No newline at end of file -- 2.48.1