From 1fbe2d6911068fce23ba9110da72724786cf8687 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 01:15:35 -0700 Subject: [PATCH 01/30] add automated format check --- .gitea/workflows/checks.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .gitea/workflows/checks.yml diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml new file mode 100644 index 0000000..5a3353d --- /dev/null +++ b/.gitea/workflows/checks.yml @@ -0,0 +1,14 @@ +name: checks +on: + - push + - pull_request + +jobs: + lint: + runs_on: "alpine_amd64" + container: + image: "rust:1.73-alpine3.18" + name: format + steps: + - name: rustfmt + run: cargo fmt --check -- 2.30.2 From cab056ea690744866f2409a55b007fa5d8bea3aa Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 01:26:51 -0700 Subject: [PATCH 02/30] test --- .gitea/workflows/checks.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 5a3353d..28cad70 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -5,7 +5,6 @@ on: jobs: lint: - runs_on: "alpine_amd64" container: image: "rust:1.73-alpine3.18" name: format -- 2.30.2 From 1c719b3061589300bf9cc74947424ff62f39b925 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 01:28:34 -0700 Subject: [PATCH 03/30] Revert "test" This reverts commit 81158ca8187e1a21615e216a9e8bf0468441ff72. --- .gitea/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 28cad70..5a3353d 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -5,6 +5,7 @@ on: jobs: lint: + runs_on: "alpine_amd64" container: image: "rust:1.73-alpine3.18" name: format -- 2.30.2 From 3b14b93d17e2a3741c005f8e15d7b5b741c6c596 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 01:34:57 -0700 Subject: [PATCH 04/30] add rustfmt --- .gitea/workflows/checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 5a3353d..3453cfb 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -10,5 +10,7 @@ jobs: image: "rust:1.73-alpine3.18" name: format steps: + - name: TODO put in image base + run: rustup component add rustfmt - name: rustfmt run: cargo fmt --check -- 2.30.2 From e27d224d3d5d3db7c7d75497a8e7c7f7ee0aef3d Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 01:41:08 -0700 Subject: [PATCH 05/30] add debug ls --- .gitea/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 3453cfb..2203bf1 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -11,6 +11,6 @@ jobs: name: format steps: - name: TODO put in image base - run: rustup component add rustfmt + run: "rustup component add rustfmt && ls" - name: rustfmt run: cargo fmt --check -- 2.30.2 From 54db9795fe4f2a8c625dd282a25db4ecff24c595 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 01:42:24 -0700 Subject: [PATCH 06/30] add debug ls --- .gitea/workflows/checks.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 2203bf1..488f3a8 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -11,6 +11,8 @@ jobs: name: format steps: - name: TODO put in image base - run: "rustup component add rustfmt && ls" + run: rustup component add rustfmt + - name: ls + run: "ls -al && pwd" - name: rustfmt run: cargo fmt --check -- 2.30.2 From 0cd0e54b666cc499ff62a45372d0f6c3e24ca1a3 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 01:45:53 -0700 Subject: [PATCH 07/30] add checkout --- .gitea/workflows/checks.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 488f3a8..1f50a47 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -10,6 +10,7 @@ jobs: image: "rust:1.73-alpine3.18" name: format steps: + - uses: actions/checkout@v4 - name: TODO put in image base run: rustup component add rustfmt - name: ls -- 2.30.2 From 5ae1314bb7884210d4a31fa889ca3ed47bcd9302 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 01:51:53 -0700 Subject: [PATCH 08/30] add node --- .gitea/workflows/checks.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 1f50a47..50ae6fc 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -10,6 +10,8 @@ jobs: image: "rust:1.73-alpine3.18" name: format steps: + - name: TODO put in image base + run: apk add nodejs - uses: actions/checkout@v4 - name: TODO put in image base run: rustup component add rustfmt -- 2.30.2 From 57313ddf7c550c04308612d0794f0732afd7dd07 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 02:18:59 -0700 Subject: [PATCH 09/30] test --- .gitea/workflows/checks.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 50ae6fc..b3af4eb 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -12,7 +12,9 @@ jobs: steps: - name: TODO put in image base run: apk add nodejs - - uses: actions/checkout@v4 + - uses: actions/checkout@v3 + with: + github-server-url: "https://code.communitymedia.network" - name: TODO put in image base run: rustup component add rustfmt - name: ls -- 2.30.2 From 0babf35c1e35a887fcf68dc51799d8184541afef Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 02:20:04 -0700 Subject: [PATCH 10/30] test --- .gitea/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index b3af4eb..176c323 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -11,7 +11,7 @@ jobs: name: format steps: - name: TODO put in image base - run: apk add nodejs + run: apk add nodejs git - uses: actions/checkout@v3 with: github-server-url: "https://code.communitymedia.network" -- 2.30.2 From d8b6e31836ad0f25faa9d4509e1d68cd400ace9b Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 02:21:52 -0700 Subject: [PATCH 11/30] fix fmt --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main.rs b/src/main.rs index bd5795f..3489aa9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,8 +2,7 @@ use warp::Filter; #[tokio::main] async fn main() { - let hello = warp::get() - .map(|| format!("Hello world!")); + let hello = warp::get().map(|| format!("Hello world!")); warp::serve(hello).run(([127, 0, 0, 1], 5309)).await; } -- 2.30.2 From b7c37613ce9d82d682a12f012080474064df98ed Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 12:33:45 -0700 Subject: [PATCH 12/30] move some steps into the base image --- .gitea/workflows/checks.yml | 9 ++------- ci/Dockerfile | 7 +++++++ 2 files changed, 9 insertions(+), 7 deletions(-) create mode 100644 ci/Dockerfile diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 176c323..f76c69f 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -7,17 +7,12 @@ jobs: lint: runs_on: "alpine_amd64" container: - image: "rust:1.73-alpine3.18" + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:0" name: format steps: - - name: TODO put in image base - run: apk add nodejs git - uses: actions/checkout@v3 with: github-server-url: "https://code.communitymedia.network" - - name: TODO put in image base - run: rustup component add rustfmt - - name: ls - run: "ls -al && pwd" - name: rustfmt run: cargo fmt --check diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 0000000..ec93337 --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,7 @@ +FROM rust:1.73-alpine3.18 + +#install build tooling +RUN rustup component add rustfmt + +# install gitea act_runner dependencies +RUN apk add nodejs git -- 2.30.2 From 2aad6e49cda3215439255606825e50dc2c0d1664 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 12:40:59 -0700 Subject: [PATCH 13/30] automated build and test --- .gitea/workflows/checks.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index f76c69f..1553bb7 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,5 +1,6 @@ name: checks on: + # XXX only run for pushes to main, or for pr - push - pull_request @@ -16,3 +17,28 @@ jobs: github-server-url: "https://code.communitymedia.network" - name: rustfmt run: cargo fmt --check + build: + runs_on: "alpine_amd64" + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:0" + name: format + steps: + - uses: actions/checkout@v3 + with: + github-server-url: "https://code.communitymedia.network" + - name: build + run: cargo build + # TODO(cascode) cache builds for test stage + test: + runs_on: "alpine_amd64" + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:0" + name: format + steps: + - uses: actions/checkout@v3 + with: + github-server-url: "https://code.communitymedia.network" + - name: run unit tests + run: cargo test -- 2.30.2 From dc01798dfad3fb31dd0432459ca8ac4854e6c20c Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 12:51:49 -0700 Subject: [PATCH 14/30] names and images changes --- .gitea/workflows/checks.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 1553bb7..84396b5 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -10,7 +10,6 @@ jobs: container: # TODO use communitymedia docker registry image: "cascode/aural-isle-ci:0" - name: format steps: - uses: actions/checkout@v3 with: @@ -21,8 +20,7 @@ jobs: runs_on: "alpine_amd64" container: # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:0" - name: format + image: "cascode/aural-isle-ci:1" steps: - uses: actions/checkout@v3 with: @@ -35,7 +33,6 @@ jobs: container: # TODO use communitymedia docker registry image: "cascode/aural-isle-ci:0" - name: format steps: - uses: actions/checkout@v3 with: -- 2.30.2 From 8c46018fee64cbea205c0a8926252559a345d567 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 12:54:44 -0700 Subject: [PATCH 15/30] image changes --- .gitea/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 84396b5..af95a82 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -20,7 +20,7 @@ jobs: runs_on: "alpine_amd64" container: # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:1" + image: "cascode/aural-isle-ci:2" steps: - uses: actions/checkout@v3 with: -- 2.30.2 From 7360bba00e3b778861078fb733ddeccd25667a91 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 12:57:31 -0700 Subject: [PATCH 16/30] add build deps to ci docker image --- ci/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/Dockerfile b/ci/Dockerfile index ec93337..ba54756 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -1,7 +1,7 @@ FROM rust:1.73-alpine3.18 #install build tooling -RUN rustup component add rustfmt +RUN apk add musl-dev && rustup component add rustfmt # install gitea act_runner dependencies RUN apk add nodejs git -- 2.30.2 From 05b6ffc807bb5259ea632683343a69aa4ef81f15 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 12:58:19 -0700 Subject: [PATCH 17/30] image changes --- .gitea/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index af95a82..1228693 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -32,7 +32,7 @@ jobs: runs_on: "alpine_amd64" container: # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:0" + image: "cascode/aural-isle-ci:2" steps: - uses: actions/checkout@v3 with: -- 2.30.2 From 55ec00d1fb9407604d861f3e4dcfa5e289868f62 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 13:06:42 -0700 Subject: [PATCH 18/30] only run for push on main, or for pr --- .gitea/workflows/checks.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 1228693..2b3d8cb 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,7 +1,8 @@ name: checks on: - # XXX only run for pushes to main, or for pr - push + branches: + - main - pull_request jobs: -- 2.30.2 From de9d8dde88836b51024e0e55d75a7d94648ba546 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 13:15:54 -0700 Subject: [PATCH 19/30] reorder triggers --- .gitea/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 2b3d8cb..79a4aaf 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,9 +1,9 @@ name: checks on: + - pull_request - push branches: - main - - pull_request jobs: lint: -- 2.30.2 From cd4333cacd3d418ed67d2b55914cea43699029d4 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 13:17:12 -0700 Subject: [PATCH 20/30] change triggers --- .gitea/workflows/checks.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 79a4aaf..00feece 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,9 +1,6 @@ name: checks on: - pull_request - - push - branches: - - main jobs: lint: -- 2.30.2 From 691afc382d0cfbdae2a0f4f6b865458b14a254c3 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 13:20:41 -0700 Subject: [PATCH 21/30] change triggers --- .gitea/workflows/checks.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 00feece..01960a8 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,6 +1,9 @@ name: checks on: - - pull_request + pull_request: + push: + branches: + - main jobs: lint: -- 2.30.2 From c5f723210b9b896957429a0b770b78e2aaf8b4f6 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 13:40:00 -0700 Subject: [PATCH 22/30] try removing runner tag --- .gitea/workflows/checks.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 01960a8..796eca7 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -18,7 +18,6 @@ jobs: - name: rustfmt run: cargo fmt --check build: - runs_on: "alpine_amd64" container: # TODO use communitymedia docker registry image: "cascode/aural-isle-ci:2" @@ -30,7 +29,6 @@ jobs: run: cargo build # TODO(cascode) cache builds for test stage test: - runs_on: "alpine_amd64" container: # TODO use communitymedia docker registry image: "cascode/aural-isle-ci:2" -- 2.30.2 From 614d7b8a209a06770fc2e240e2a33e5eea9ae582 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 13:41:29 -0700 Subject: [PATCH 23/30] remove runner tag --- .gitea/workflows/checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 796eca7..bac6ede 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -7,7 +7,6 @@ on: jobs: lint: - runs_on: "alpine_amd64" container: # TODO use communitymedia docker registry image: "cascode/aural-isle-ci:0" @@ -17,6 +16,7 @@ jobs: github-server-url: "https://code.communitymedia.network" - name: rustfmt run: cargo fmt --check + # TODO(cascode) cache checkout for build and test stages build: container: # TODO use communitymedia docker registry -- 2.30.2 From 4957b363551267627083335af9a72878bea88c69 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 13:50:21 -0700 Subject: [PATCH 24/30] only run on some path changes --- .gitea/workflows/checks.yml | 17 ++++++----------- .gitea/workflows/lint.yml | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 11 deletions(-) create mode 100644 .gitea/workflows/lint.yml diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index bac6ede..a4a5adc 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,22 +1,17 @@ name: checks on: pull_request: + paths: + - 'src/**' + - 'Cargo*' push: + paths: + - 'src/**' + - 'Cargo*' branches: - main jobs: - lint: - container: - # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:0" - steps: - - uses: actions/checkout@v3 - with: - github-server-url: "https://code.communitymedia.network" - - name: rustfmt - run: cargo fmt --check - # TODO(cascode) cache checkout for build and test stages build: container: # TODO use communitymedia docker registry diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml new file mode 100644 index 0000000..b4eb8aa --- /dev/null +++ b/.gitea/workflows/lint.yml @@ -0,0 +1,19 @@ +name: lint +on: + pull_request: + push: + branches: + - main + +jobs: + # TODO(cascode) cache checkout for build and test stages? + lint: + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:0" + steps: + - uses: actions/checkout@v3 + with: + github-server-url: "https://code.communitymedia.network" + - name: rustfmt + run: cargo fmt --check -- 2.30.2 From 8e0984e7b13b0b2354b1dc8772eac316347454fd Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 13:54:28 -0700 Subject: [PATCH 25/30] re-merge file --- .gitea/workflows/checks.yml | 11 +++++++++++ .gitea/workflows/lint.yml | 19 ------------------- 2 files changed, 11 insertions(+), 19 deletions(-) delete mode 100644 .gitea/workflows/lint.yml diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index a4a5adc..4165ecf 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -12,6 +12,17 @@ on: - main jobs: + # TODO(cascode) cache checkout for build and test stages? + lint: + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:0" + steps: + - uses: actions/checkout@v3 + with: + github-server-url: "https://code.communitymedia.network" + - name: rustfmt + run: cargo fmt --check build: container: # TODO use communitymedia docker registry diff --git a/.gitea/workflows/lint.yml b/.gitea/workflows/lint.yml deleted file mode 100644 index b4eb8aa..0000000 --- a/.gitea/workflows/lint.yml +++ /dev/null @@ -1,19 +0,0 @@ -name: lint -on: - pull_request: - push: - branches: - - main - -jobs: - # TODO(cascode) cache checkout for build and test stages? - lint: - container: - # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:0" - steps: - - uses: actions/checkout@v3 - with: - github-server-url: "https://code.communitymedia.network" - - name: rustfmt - run: cargo fmt --check -- 2.30.2 From f5b7db930dd4225274d5cc14507ded4589417eaf Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 14:10:44 -0700 Subject: [PATCH 26/30] more concise --- .gitea/workflows/checks.yml | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 4165ecf..3e56abe 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,46 +1,40 @@ name: checks on: pull_request: - paths: + paths: &CODE_PATHS - 'src/**' - 'Cargo*' push: - paths: - - 'src/**' - - 'Cargo*' + paths: *CODE_PATHS branches: - main jobs: # TODO(cascode) cache checkout for build and test stages? lint: - container: + container: &BUILD_CONTAINER # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:0" + image: &BUILDER_IMAGE "cascode/aural-isle-ci:2" steps: - uses: actions/checkout@v3 with: - github-server-url: "https://code.communitymedia.network" + github-server-url: &GIT_URL "https://code.communitymedia.network" - name: rustfmt run: cargo fmt --check build: - container: - # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:2" + container: *BUILD_CONTAINER steps: - uses: actions/checkout@v3 with: - github-server-url: "https://code.communitymedia.network" + github-server-url: *GIT_URL - name: build run: cargo build # TODO(cascode) cache builds for test stage test: - container: - # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:2" + container: *BUILD_CONTAINER steps: - uses: actions/checkout@v3 with: - github-server-url: "https://code.communitymedia.network" + github-server-url: *GIT_URL - name: run unit tests run: cargo test -- 2.30.2 From 8b5b5b539be66371d5ec97efc9b083c179c9a2f8 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 14:11:49 -0700 Subject: [PATCH 27/30] Revert "more concise" This reverts commit a0e6005acd55bf86a73ef180c425a67e7a040bef. --- .gitea/workflows/checks.yml | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 3e56abe..4165ecf 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,40 +1,46 @@ name: checks on: pull_request: - paths: &CODE_PATHS + paths: - 'src/**' - 'Cargo*' push: - paths: *CODE_PATHS + paths: + - 'src/**' + - 'Cargo*' branches: - main jobs: # TODO(cascode) cache checkout for build and test stages? lint: - container: &BUILD_CONTAINER + container: # TODO use communitymedia docker registry - image: &BUILDER_IMAGE "cascode/aural-isle-ci:2" + image: "cascode/aural-isle-ci:0" steps: - uses: actions/checkout@v3 with: - github-server-url: &GIT_URL "https://code.communitymedia.network" + github-server-url: "https://code.communitymedia.network" - name: rustfmt run: cargo fmt --check build: - container: *BUILD_CONTAINER + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:2" steps: - uses: actions/checkout@v3 with: - github-server-url: *GIT_URL + github-server-url: "https://code.communitymedia.network" - name: build run: cargo build # TODO(cascode) cache builds for test stage test: - container: *BUILD_CONTAINER + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:2" steps: - uses: actions/checkout@v3 with: - github-server-url: *GIT_URL + github-server-url: "https://code.communitymedia.network" - name: run unit tests run: cargo test -- 2.30.2 From b511e5a81ab38b193fab894f8bc0f3d7e8410bb1 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 14:12:12 -0700 Subject: [PATCH 28/30] more concise --- .gitea/workflows/checks.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 4165ecf..02f5f3e 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -1,13 +1,11 @@ name: checks on: pull_request: - paths: + paths: &CODE_PATHS - 'src/**' - 'Cargo*' push: - paths: - - 'src/**' - - 'Cargo*' + paths: *CODE_PATHS branches: - main -- 2.30.2 From 3e80545d6bbf26ff5188a169aa7fbdfb47387e2f Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 14:14:01 -0700 Subject: [PATCH 29/30] var for images --- .gitea/workflows/checks.yml | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index 02f5f3e..ef740a9 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -11,10 +11,10 @@ on: jobs: # TODO(cascode) cache checkout for build and test stages? + # TODO use communitymedia docker registry lint: - container: - # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:0" + container: &BUILD_CONTAINER + image: "cascode/aural-isle-ci:2" steps: - uses: actions/checkout@v3 with: @@ -22,9 +22,7 @@ jobs: - name: rustfmt run: cargo fmt --check build: - container: - # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:2" + container: *BUILD_CONTAINER steps: - uses: actions/checkout@v3 with: @@ -33,9 +31,7 @@ jobs: run: cargo build # TODO(cascode) cache builds for test stage test: - container: - # TODO use communitymedia docker registry - image: "cascode/aural-isle-ci:2" + container: *BUILD_CONTAINER steps: - uses: actions/checkout@v3 with: -- 2.30.2 From d85d6285d2b511e1071811d45bb1a23cf8acbbf6 Mon Sep 17 00:00:00 2001 From: cascode Date: Sat, 21 Oct 2023 14:14:27 -0700 Subject: [PATCH 30/30] Revert "var for images" This reverts commit 0c3ecb27302a5f29d072c382dc75bd633b44f155. --- .gitea/workflows/checks.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/checks.yml b/.gitea/workflows/checks.yml index ef740a9..02f5f3e 100644 --- a/.gitea/workflows/checks.yml +++ b/.gitea/workflows/checks.yml @@ -11,10 +11,10 @@ on: jobs: # TODO(cascode) cache checkout for build and test stages? - # TODO use communitymedia docker registry lint: - container: &BUILD_CONTAINER - image: "cascode/aural-isle-ci:2" + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:0" steps: - uses: actions/checkout@v3 with: @@ -22,7 +22,9 @@ jobs: - name: rustfmt run: cargo fmt --check build: - container: *BUILD_CONTAINER + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:2" steps: - uses: actions/checkout@v3 with: @@ -31,7 +33,9 @@ jobs: run: cargo build # TODO(cascode) cache builds for test stage test: - container: *BUILD_CONTAINER + container: + # TODO use communitymedia docker registry + image: "cascode/aural-isle-ci:2" steps: - uses: actions/checkout@v3 with: -- 2.30.2