From a2099da6a06b7a3e9f42d4dce38b74356e53a34e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 May 2024 19:44:39 +0100 Subject: [PATCH 001/106] first viable version --- .forgejo/workflows/test.yml | 2 +- Dockerfile | 2 +- entrypoint.sh | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index f315553..734cf44 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -4,6 +4,6 @@ jobs: runs-on: docker steps: - name: Test Rust image - uses: https://git.kemitix.net/kemitix/rust@v0.1.0 + uses: https://git.kemitix.net/kemitix/rust@v0.2.0 with: args: test diff --git a/Dockerfile b/Dockerfile index efd465f..966a772 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ FROM docker.io/rust:1.78.0-slim-bookworm RUN apt-get update && \ apt-get install -y \ --no-install-recommends \ - nodejs \ + nodejs=18.19.0+dfsg-6~deb12u1 \ curl=7.88.1-10+deb12u5 \ clang-16=1:16.0.6-15~deb12u1 \ mold=1.10.1+dfsg-1 && \ diff --git a/entrypoint.sh b/entrypoint.sh index b2c018c..1dddfc8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,6 +2,4 @@ set -e -# set -ls -l -echo cargo ${INPUT_ARGS} +cargo ${INPUT_ARGS} From 37ddea7767fd57af8133ea97ca93a2932842c65e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 May 2024 19:46:05 +0100 Subject: [PATCH 002/106] Add sample app to build and test --- .gitignore | 1 + Cargo.toml | 6 ++++++ src/main.rs | 3 +++ 3 files changed, 10 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.toml create mode 100644 src/main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..7d75412 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "rust" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/src/main.rs b/src/main.rs new file mode 100644 index 0000000..e7a11a9 --- /dev/null +++ b/src/main.rs @@ -0,0 +1,3 @@ +fn main() { + println!("Hello, world!"); +} From b3f58576c6af1e3b5053375b6dbf301b150f7775 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 May 2024 19:47:20 +0100 Subject: [PATCH 003/106] build and test --- .forgejo/workflows/test.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 734cf44..50b6116 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -3,7 +3,11 @@ jobs: test: runs-on: docker steps: - - name: Test Rust image - uses: https://git.kemitix.net/kemitix/rust@v0.2.0 + - name: Test + uses: https://git.kemitix.net/kemitix/rust@v0.2.1 with: args: test + - name: Build + uses: https://git.kemitix.net/kemitix/rust@v0.2.1 + with: + args: build From a5931336f273efe5bbddc10251e68b078939d3d3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 May 2024 19:50:04 +0100 Subject: [PATCH 004/106] verify pwd and files in dir --- .forgejo/workflows/test.yml | 4 ++-- entrypoint.sh | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 50b6116..fc38aad 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -4,10 +4,10 @@ jobs: runs-on: docker steps: - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.2.1 + uses: https://git.kemitix.net/kemitix/rust@v0.2.2 with: args: test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.2.1 + uses: https://git.kemitix.net/kemitix/rust@v0.2.2 with: args: build diff --git a/entrypoint.sh b/entrypoint.sh index 1dddfc8..ab6d17c 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,4 +2,6 @@ set -e +pwd +ls -l cargo ${INPUT_ARGS} From e4f0032f1a4e3c63d8455228ced71505caf865bd Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 May 2024 19:53:35 +0100 Subject: [PATCH 005/106] test should checkout the project --- .forgejo/workflows/test.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index fc38aad..2051983 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -3,11 +3,13 @@ jobs: test: runs-on: docker steps: + - uses: actions/checkout@v4 + - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.2.2 + uses: https://git.kemitix.net/kemitix/rust@v0.2.3 with: args: test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.2.2 + uses: https://git.kemitix.net/kemitix/rust@v0.2.3 with: args: build From b8636bc4fc4af10fe4d5a3f6e814bb7c92880258 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 May 2024 19:54:56 +0100 Subject: [PATCH 006/106] test runs the project --- .forgejo/workflows/test.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 2051983..5eda717 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -6,10 +6,16 @@ jobs: - uses: actions/checkout@v4 - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.2.3 + uses: https://git.kemitix.net/kemitix/rust@v0.2.4 with: args: test + - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.2.3 + uses: https://git.kemitix.net/kemitix/rust@v0.2.4 with: args: build + + - name: Run + uses: https://git.kemitix.net/kemitix/rust@v0.2.4 + with: + args: run From adc3dbb7101b599f8a709580ccb154fad0edc821 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 May 2024 19:55:36 +0100 Subject: [PATCH 007/106] entrypoint: remove diagnostics --- entrypoint.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index ab6d17c..1dddfc8 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,6 +2,4 @@ set -e -pwd -ls -l cargo ${INPUT_ARGS} From d15458ca5144a10fed17697ba9c6f9976bd429c0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 17 May 2024 06:54:43 +0100 Subject: [PATCH 008/106] add libssl-dev as dependency --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 966a772..de29396 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,17 @@ FROM docker.io/rust:1.78.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall # clang-16 & mold - faster linkers for rust -RUN apt-get update && \ +# libssl-dev - build dependency for git-next +RUN apt-get update \ + && \ apt-get install -y \ --no-install-recommends \ nodejs=18.19.0+dfsg-6~deb12u1 \ curl=7.88.1-10+deb12u5 \ clang-16=1:16.0.6-15~deb12u1 \ - mold=1.10.1+dfsg-1 && \ + mold=1.10.1+dfsg-1 \ + libssl-dev=3.0.11-1~deb12u2 \ + && \ rm -r /var/lib/apt/lists/* RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ From e684533f8e695c65f2dbbb92dc1a318b9bf313c4 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 17 May 2024 06:56:50 +0100 Subject: [PATCH 009/106] Version set to v0.2.5 --- .forgejo/workflows/test.yml | 6 +++--- README.md | 13 ++++++------- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 5eda717..32b658c 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -6,16 +6,16 @@ jobs: - uses: actions/checkout@v4 - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.2.4 + uses: https://git.kemitix.net/kemitix/rust@v0.2.5 with: args: test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.2.4 + uses: https://git.kemitix.net/kemitix/rust@v0.2.5 with: args: build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v0.2.4 + uses: https://git.kemitix.net/kemitix/rust@v0.2.5 with: args: run diff --git a/README.md b/README.md index 6055f11..d6d3521 100644 --- a/README.md +++ b/README.md @@ -12,13 +12,12 @@ jobs: test: runs-on: docker steps: - - uses: https://git.kemitix.net/kemitix/rust@main + - uses: https://git.kemitix.net/kemitix/rust@v0.2.5 with: args: test - - uses: https://git.kemitix.net/kemitix/rust@main + - uses: https://git.kemitix.net/kemitix/rust@v0.2.5 with: args: build - ``` ## Contents @@ -35,8 +34,8 @@ jobs: To take advantage of the clang and mold packages, add the following to the `.cargo/config.toml` file in your project. ```toml -[target.x86_64-unknown-linux-gnu] -linker = "/usr/bin/clang-16" +[target.x86_64-unknown-linux-gnu] +linker = "/usr/bin/clang-16" rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"] ``` @@ -45,7 +44,7 @@ rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"] To reduce the size of the debug binary, add the following to the `.cargo/config.toml` file in you project. ```toml -[profile.dev] -debug = 0 +[profile.dev] +debug = 0 strip = "debuginfo" ``` From b4a93ca6693878298492f828ec1765a1a364237d Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 17 May 2024 07:02:00 +0100 Subject: [PATCH 010/106] Revert "add libssl-dev as dependency" This reverts commit d15458ca5144a10fed17697ba9c6f9976bd429c0. --- Dockerfile | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index de29396..966a772 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,17 +3,13 @@ FROM docker.io/rust:1.78.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall # clang-16 & mold - faster linkers for rust -# libssl-dev - build dependency for git-next -RUN apt-get update \ - && \ +RUN apt-get update && \ apt-get install -y \ --no-install-recommends \ nodejs=18.19.0+dfsg-6~deb12u1 \ curl=7.88.1-10+deb12u5 \ clang-16=1:16.0.6-15~deb12u1 \ - mold=1.10.1+dfsg-1 \ - libssl-dev=3.0.11-1~deb12u2 \ - && \ + mold=1.10.1+dfsg-1 && \ rm -r /var/lib/apt/lists/* RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ From d431f0778404e8eaff033beeb8d4108be92abb0f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 17 May 2024 07:03:40 +0100 Subject: [PATCH 011/106] Add pkg-config --- Dockerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 966a772..b2ec72c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,13 +3,17 @@ FROM docker.io/rust:1.78.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall # clang-16 & mold - faster linkers for rust -RUN apt-get update && \ +# pkg-config - required to compile some rust `-sys` packages +RUN apt-get update \ + && \ apt-get install -y \ --no-install-recommends \ nodejs=18.19.0+dfsg-6~deb12u1 \ curl=7.88.1-10+deb12u5 \ clang-16=1:16.0.6-15~deb12u1 \ - mold=1.10.1+dfsg-1 && \ + mold=1.10.1+dfsg-1 \ + pkg-config=1.8.1-1 \ + && \ rm -r /var/lib/apt/lists/* RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ From 8bc1fee17d901f6003e3270af3cf1ddb689ba523 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 17 May 2024 07:04:25 +0100 Subject: [PATCH 012/106] Version set to v0.2.6 --- .forgejo/workflows/test.yml | 6 +++--- README.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 32b658c..b239ea6 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -6,16 +6,16 @@ jobs: - uses: actions/checkout@v4 - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.2.5 + uses: https://git.kemitix.net/kemitix/rust@v0.2.6 with: args: test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.2.5 + uses: https://git.kemitix.net/kemitix/rust@v0.2.6 with: args: build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v0.2.5 + uses: https://git.kemitix.net/kemitix/rust@v0.2.6 with: args: run diff --git a/README.md b/README.md index d6d3521..0a546fe 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ jobs: test: runs-on: docker steps: - - uses: https://git.kemitix.net/kemitix/rust@v0.2.5 + - uses: https://git.kemitix.net/kemitix/rust@v0.2.6 with: args: test - - uses: https://git.kemitix.net/kemitix/rust@v0.2.5 + - uses: https://git.kemitix.net/kemitix/rust@v0.2.6 with: args: build ``` From 18ba93c44e989f1e58dd8424986ce7402214d80b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 17 May 2024 07:23:55 +0100 Subject: [PATCH 013/106] Revert "Revert "add libssl-dev as dependency"" This reverts commit b4a93ca6693878298492f828ec1765a1a364237d. --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index b2ec72c..d20a3ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,6 +4,7 @@ FROM docker.io/rust:1.78.0-slim-bookworm # curl - to download cargo-binstall # clang-16 & mold - faster linkers for rust # pkg-config - required to compile some rust `-sys` packages +# libssl-dev - build dependency for git-next RUN apt-get update \ && \ apt-get install -y \ @@ -13,6 +14,7 @@ RUN apt-get update \ clang-16=1:16.0.6-15~deb12u1 \ mold=1.10.1+dfsg-1 \ pkg-config=1.8.1-1 \ + libssl-dev=3.0.11-1~deb12u2 \ && \ rm -r /var/lib/apt/lists/* From b8b8d82104307f2f8e51ed443af1f589655b6b5f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 17 May 2024 07:24:49 +0100 Subject: [PATCH 014/106] Version set to v0.2.7 --- .forgejo/workflows/test.yml | 6 +++--- README.md | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index b239ea6..5e8afe4 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -6,16 +6,16 @@ jobs: - uses: actions/checkout@v4 - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.2.6 + uses: https://git.kemitix.net/kemitix/rust@v0.2.7 with: args: test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.2.6 + uses: https://git.kemitix.net/kemitix/rust@v0.2.7 with: args: build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v0.2.6 + uses: https://git.kemitix.net/kemitix/rust@v0.2.7 with: args: run diff --git a/README.md b/README.md index 0a546fe..42973be 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ jobs: test: runs-on: docker steps: - - uses: https://git.kemitix.net/kemitix/rust@v0.2.6 + - uses: https://git.kemitix.net/kemitix/rust@v0.2.7 with: args: test - - uses: https://git.kemitix.net/kemitix/rust@v0.2.6 + - uses: https://git.kemitix.net/kemitix/rust@v0.2.7 with: args: build ``` From b47fefcbf5067a90ed88d5fe62cc1aec8cd37fd9 Mon Sep 17 00:00:00 2001 From: kemitix Date: Thu, 13 Jun 2024 19:37:18 +0100 Subject: [PATCH 015/106] Add git to environment Allows the use of git in actions. Signed-off-by: kemitix --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d20a3ef..a529f83 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update \ mold=1.10.1+dfsg-1 \ pkg-config=1.8.1-1 \ libssl-dev=3.0.11-1~deb12u2 \ + git=1:2.39.2-1.1 \ && \ rm -r /var/lib/apt/lists/* From 86b4cfec6945206be515314437219baacd6143e9 Mon Sep 17 00:00:00 2001 From: kemitix Date: Thu, 13 Jun 2024 19:38:47 +0100 Subject: [PATCH 016/106] docs: Update README to include git and next version number Signed-off-by: kemitix --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 42973be..c750656 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ jobs: test: runs-on: docker steps: - - uses: https://git.kemitix.net/kemitix/rust@v0.2.7 + - uses: https://git.kemitix.net/kemitix/rust@v0.3.0 with: args: test - - uses: https://git.kemitix.net/kemitix/rust@v0.2.7 + - uses: https://git.kemitix.net/kemitix/rust@v0.3.0 with: args: build ``` @@ -26,6 +26,7 @@ jobs: - clang-16 - mold - rust +- git - cargo - cargo-binstall From e753a6169dcea3308db65b3817e607d12903f84d Mon Sep 17 00:00:00 2001 From: kemitix Date: Thu, 13 Jun 2024 19:39:40 +0100 Subject: [PATCH 017/106] Update .forgejo/workflows/test.yml Signed-off-by: kemitix --- .forgejo/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 5e8afe4..cfed590 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -6,16 +6,16 @@ jobs: - uses: actions/checkout@v4 - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.2.7 + uses: https://git.kemitix.net/kemitix/rust@v0.3.0 with: args: test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.2.7 + uses: https://git.kemitix.net/kemitix/rust@v0.3.0 with: args: build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v0.2.7 + uses: https://git.kemitix.net/kemitix/rust@v0.3.0 with: args: run From 613e34beeb42458d307858e027e64dad0030549f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 13 Jun 2024 19:48:39 +0100 Subject: [PATCH 018/106] fix: configure git email and username --- .forgejo/workflows/test.yml | 6 +++--- Dockerfile | 2 ++ README.md | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index cfed590..b7b6410 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -6,16 +6,16 @@ jobs: - uses: actions/checkout@v4 - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.3.0 + uses: https://git.kemitix.net/kemitix/rust@v0.3.1 with: args: test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.3.0 + uses: https://git.kemitix.net/kemitix/rust@v0.3.1 with: args: build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v0.3.0 + uses: https://git.kemitix.net/kemitix/rust@v0.3.1 with: args: run diff --git a/Dockerfile b/Dockerfile index a529f83..e99cb2a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,4 +30,6 @@ RUN rustup component add rustfmt clippy COPY entrypoint.sh / +RUN git config --global user.email "action@git.kemitix.net" && git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" + ENTRYPOINT [ "/entrypoint.sh" ] diff --git a/README.md b/README.md index c750656..52d2751 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ jobs: test: runs-on: docker steps: - - uses: https://git.kemitix.net/kemitix/rust@v0.3.0 + - uses: https://git.kemitix.net/kemitix/rust@v0.3.1 with: args: test - - uses: https://git.kemitix.net/kemitix/rust@v0.3.0 + - uses: https://git.kemitix.net/kemitix/rust@v0.3.1 with: args: build ``` From d52e8761a93fda6543d93a303747306caa5b7608 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 2 Aug 2024 18:16:19 +0000 Subject: [PATCH 019/106] Add renovate.json --- renovate.json | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 renovate.json diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..5db72dd --- /dev/null +++ b/renovate.json @@ -0,0 +1,6 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": [ + "config:recommended" + ] +} From 191d0ab7e26c63a0db1f804d54dfed4f6363644c Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 2 Aug 2024 18:31:18 +0000 Subject: [PATCH 020/106] chore(deps): update docker.io/rust docker tag to v1.80.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e99cb2a..71b4fe0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.78.0-slim-bookworm +FROM docker.io/rust:1.80.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall From 32da1e8aef8f1ee46e11600a8eaeea2237189e88 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 2 Aug 2024 19:41:41 +0100 Subject: [PATCH 021/106] docs: update example to use rust version --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 52d2751..6c5e7c8 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ jobs: test: runs-on: docker steps: - - uses: https://git.kemitix.net/kemitix/rust@v0.3.1 + - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: args: test - - uses: https://git.kemitix.net/kemitix/rust@v0.3.1 + - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: args: build ``` From b51a3e44d0dfac0122f63484fec2295cb5627d21 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 2 Aug 2024 18:46:25 +0000 Subject: [PATCH 022/106] chore(deps): update kemitix/rust action to v1 --- .forgejo/workflows/test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index b7b6410..62d1d6a 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -6,16 +6,16 @@ jobs: - uses: actions/checkout@v4 - name: Test - uses: https://git.kemitix.net/kemitix/rust@v0.3.1 + uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: args: test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v0.3.1 + uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: args: build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v0.3.1 + uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: args: run From b961de0eecfffb6ab436a2eea27d15f678233556 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 2 Aug 2024 20:04:09 +0100 Subject: [PATCH 023/106] chore: bump debian packages 4.234 curl : Depends: libcurl4 (= 7.88.1-10+deb12u5) but 7.88.1-10+deb12u6 is to be installed4.236 libssl-dev : Depends: libssl3 (= 3.0.11-1~deb12u2) but 3.0.13-1~deb12u1 is to be installed4.236 nodejs : Depends: libnode108 (= 18.19.0+dfsg-6~deb12u1) but 18.19.0+dfsg-6~deb12u2 is to be installed --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 71b4fe0..1bc5489 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,12 +9,12 @@ RUN apt-get update \ && \ apt-get install -y \ --no-install-recommends \ - nodejs=18.19.0+dfsg-6~deb12u1 \ - curl=7.88.1-10+deb12u5 \ + nodejs=18.19.0+dfsg-6~deb12u2 \ + curl=7.88.1-10+deb12u6 \ clang-16=1:16.0.6-15~deb12u1 \ mold=1.10.1+dfsg-1 \ pkg-config=1.8.1-1 \ - libssl-dev=3.0.11-1~deb12u2 \ + libssl-dev=3.0.13-1~deb12u1 \ git=1:2.39.2-1.1 \ && \ rm -r /var/lib/apt/lists/* From c467d164cf5dfcbafac459ba02a472fc8a8ccbdc Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 3 Aug 2024 12:58:00 +0100 Subject: [PATCH 024/106] feat: add libdbus-1-dev --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1bc5489..915bf4c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,6 +15,7 @@ RUN apt-get update \ mold=1.10.1+dfsg-1 \ pkg-config=1.8.1-1 \ libssl-dev=3.0.13-1~deb12u1 \ + libdbus-1-dev=1.14.10-1~deb12u1 \ git=1:2.39.2-1.1 \ && \ rm -r /var/lib/apt/lists/* From 1ba7a4bc43d783ec32f63e2d82c45ea59e0cac64 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Aug 2024 14:49:42 +0100 Subject: [PATCH 025/106] chore(deps): specify cargo-binstall version as v1.9.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 915bf4c..257f393 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ RUN apt-get update \ && \ rm -r /var/lib/apt/lists/* -RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/latest/download/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ +RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9.0/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ rm cargo-binstall.tgz && \ mv cargo-binstall /usr/local/bin/ From 58228eeddbc69b81c84399f33d48a5d40dfe392c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Aug 2024 14:50:21 +0100 Subject: [PATCH 026/106] chore(deps): specify cargo-chef version as v0.1.67 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 257f393..a205818 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,7 @@ RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9. rm cargo-binstall.tgz && \ mv cargo-binstall /usr/local/bin/ -RUN cargo binstall -y cargo-chef +RUN cargo binstall -y cargo-chef@0.1.67 RUN rustup component add rustfmt clippy From 6cd663f559da97955c3e08bdb184669c47ae158a Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Aug 2024 14:50:43 +0100 Subject: [PATCH 027/106] chore(deps): add release-plz version as v0.3.80 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a205818..8e18659 100644 --- a/Dockerfile +++ b/Dockerfile @@ -25,7 +25,8 @@ RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9. rm cargo-binstall.tgz && \ mv cargo-binstall /usr/local/bin/ -RUN cargo binstall -y cargo-chef@0.1.67 +RUN cargo binstall -y cargo-chef@0.1.67 \ + release-plz@0.3.80 RUN rustup component add rustfmt clippy From be47ad0bab99ebd74de7cfdbdcde14780a680991 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Aug 2024 15:03:35 +0100 Subject: [PATCH 028/106] feat!: can run commands other than cargo All existing uses will now need to explicitly include the leading `cargo` in their args. --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 1dddfc8..767aef2 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,4 +2,4 @@ set -e -cargo ${INPUT_ARGS} +${INPUT_ARGS} From c52269835bb78b2056ab9efa99afa7713639c659 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 4 Aug 2024 15:40:15 +0100 Subject: [PATCH 029/106] chore(docker): cleanup Dockerfile --- Dockerfile | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8e18659..e59def4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,6 +5,8 @@ FROM docker.io/rust:1.80.0-slim-bookworm # clang-16 & mold - faster linkers for rust # pkg-config - required to compile some rust `-sys` packages # libssl-dev - build dependency for git-next +# libdbus-1-dev - linux os interop (e.g. desktop notifications) +# git - git RUN apt-get update \ && \ apt-get install -y \ @@ -25,13 +27,14 @@ RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9. rm cargo-binstall.tgz && \ mv cargo-binstall /usr/local/bin/ -RUN cargo binstall -y cargo-chef@0.1.67 \ - release-plz@0.3.80 - -RUN rustup component add rustfmt clippy +RUN cargo binstall -y \ + cargo-chef@0.1.67 \ + release-plz@0.3.80 && \ + rustup component add rustfmt clippy COPY entrypoint.sh / -RUN git config --global user.email "action@git.kemitix.net" && git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" +RUN git config --global user.email "action@git.kemitix.net" && \ + git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" ENTRYPOINT [ "/entrypoint.sh" ] From 2c02c6fdaf6fb950ca2c7948b7c19744ff6a3768 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 8 Aug 2024 20:46:58 +0000 Subject: [PATCH 030/106] chore(deps): update docker.io/rust docker tag to v1.80.1 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e59def4..da784e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.80.0-slim-bookworm +FROM docker.io/rust:1.80.1-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall From 5b0798277d77707d5452c44a481e5e24d81eb8d7 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 11 Aug 2024 07:15:31 +0100 Subject: [PATCH 031/106] fix: test runs on push to next and uses next branch --- .forgejo/workflows/test.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 62d1d6a..5434bd4 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -1,4 +1,7 @@ -on: [push] +on: + push: + branches: + - next jobs: test: runs-on: docker @@ -6,16 +9,16 @@ jobs: - uses: actions/checkout@v4 - name: Test - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 + uses: https://git.kemitix.net/kemitix/rust@next with: - args: test + args: cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 + uses: https://git.kemitix.net/kemitix/rust@next with: - args: build + args: cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 + uses: https://git.kemitix.net/kemitix/rust@next with: - args: run + args: cargo run From ec0b626ed8b4b633baeeb4490348cc3c733ca56d Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 12 Aug 2024 09:37:39 +0100 Subject: [PATCH 032/106] feature: add cargo-hack v0.6.31 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index da784e2..81cc022 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,6 +29,7 @@ RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9. RUN cargo binstall -y \ cargo-chef@0.1.67 \ + cargo-hack@0.6.31 \ release-plz@0.3.80 && \ rustup component add rustfmt clippy From af08c9a7ce0d9421c777ef006da165fafef4caa4 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Fri, 6 Sep 2024 00:02:43 +0000 Subject: [PATCH 033/106] chore(deps): update docker.io/rust docker tag to v1.81.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 81cc022..2c2c126 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.80.1-slim-bookworm +FROM docker.io/rust:1.81.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall From c231f792f222d7ef627d594cc0d2e592be4b2dfa Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 7 Sep 2024 12:39:24 +0100 Subject: [PATCH 034/106] chore: upgrade libssl-dev and curl to current debian versions --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2c2c126..8f3ea3c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,11 +12,11 @@ RUN apt-get update \ apt-get install -y \ --no-install-recommends \ nodejs=18.19.0+dfsg-6~deb12u2 \ - curl=7.88.1-10+deb12u6 \ + curl=7.88.1-10+deb12u7 \ clang-16=1:16.0.6-15~deb12u1 \ mold=1.10.1+dfsg-1 \ pkg-config=1.8.1-1 \ - libssl-dev=3.0.13-1~deb12u1 \ + libssl-dev=3.0.14-1~deb12u2 \ libdbus-1-dev=1.14.10-1~deb12u1 \ git=1:2.39.2-1.1 \ && \ From de4785cc294e240d236b5cd72caac5dbfe4a70ee Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 9 Sep 2024 08:30:29 +0100 Subject: [PATCH 035/106] feat: ensure toolchains are up-to-date --- entrypoint.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/entrypoint.sh b/entrypoint.sh index 767aef2..284c41a 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,4 +2,5 @@ set -e +rustup update ${INPUT_ARGS} From 41d2bb484e95af5766cc8bacb17f3d2787645a7f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 16 Sep 2024 16:16:53 +0100 Subject: [PATCH 036/106] docs: update README to current syntax --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6c5e7c8..9b4b8e2 100644 --- a/README.md +++ b/README.md @@ -14,10 +14,10 @@ jobs: steps: - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: - args: test + args: cargo test - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: - args: build + args: cargo build ``` ## Contents From e931692d3336a3448243e161e6a74d7e814d9562 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 16 Sep 2024 16:19:59 +0100 Subject: [PATCH 037/106] feat!: drop clang and mold --- Dockerfile | 2 -- README.md | 12 ------------ 2 files changed, 14 deletions(-) diff --git a/Dockerfile b/Dockerfile index 8f3ea3c..914accc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,8 +13,6 @@ RUN apt-get update \ --no-install-recommends \ nodejs=18.19.0+dfsg-6~deb12u2 \ curl=7.88.1-10+deb12u7 \ - clang-16=1:16.0.6-15~deb12u1 \ - mold=1.10.1+dfsg-1 \ pkg-config=1.8.1-1 \ libssl-dev=3.0.14-1~deb12u2 \ libdbus-1-dev=1.14.10-1~deb12u1 \ diff --git a/README.md b/README.md index 9b4b8e2..498e987 100644 --- a/README.md +++ b/README.md @@ -23,23 +23,11 @@ jobs: ## Contents - nodejs -- clang-16 -- mold - rust - git - cargo - cargo-binstall -## Linking - -To take advantage of the clang and mold packages, add the following to the `.cargo/config.toml` file in your project. - -```toml -[target.x86_64-unknown-linux-gnu] -linker = "/usr/bin/clang-16" -rustflags = ["-C", "link-arg=--ld-path=/usr/bin/mold"] -``` - ## Binary size To reduce the size of the debug binary, add the following to the `.cargo/config.toml` file in you project. From dbe6a60417774dc93d5b6df9dcdef1ef753ed913 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 16 Sep 2024 16:18:49 +0100 Subject: [PATCH 038/106] feat: allow selecting the nightly toolchain --- README.md | 14 ++++++++++++-- entrypoint.sh | 45 +++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 55 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 498e987..c375b86 100644 --- a/README.md +++ b/README.md @@ -14,12 +14,22 @@ jobs: steps: - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: - args: cargo test + args: nightly cargo test - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 with: - args: cargo build + args: v1.79.0 cargo build ``` +The `args` is one of the following: + +- +- [ [nightly | stable | v1.xx.x] ] + +`COMMAND` is the command you want to run. The optional prefix is the Rust toolchain, or version. Allowed values are `nightly`, `stable` or a Rust version. + +Where the optional prefix is not given, the `stable` toolchain will be used. + + ## Contents - nodejs diff --git a/entrypoint.sh b/entrypoint.sh index 284c41a..de787ef 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,5 +2,46 @@ set -e -rustup update -${INPUT_ARGS} +echo "INPUT_ARGS: ${INPUT_ARGS}" + +# split input into an array +read -ra ARGS <<<"${INPUT_ARGS}" + +# default toolchain +TOOLCHAIN="stable" +echo "Default toolchain: ${TOOLCHAIN}" + +# if first parameter is 'nightly'... +if test "${ARGS[0]}" == "nightly"; then + TOOLCHAIN="nightly" + ARGS=("${ARGS[@]:1}") +fi +if test "${ARGS[0]}" == "stable"; then + TOOLCHAIN="stable" # redundant as this is the default + ARGS=("${ARGS[@]:1}") +fi +if [[ "${ARGS[0]}" == v1* ]]; then + TOOLCHAIN="${ARGS[0]:1}" + ARGS=("${ARGS[@]:1}") +fi +echo "Selected toolchain: ${TOOLCHAIN}" + +rustup update "${TOOLCHAIN}" + +if test "${ARGS[0]}" == "cargo";then + PRE_COMMAND="cargo +${TOOLCHAIN} " +else + PRE_COMMAND="${ARGS[0]}" +fi +ARGS=("${ARGS[@]:1}") + +# ensure toolchain is up-to-date +# recombine remaining arguments +COMMAND=$( + IFS=" " + echo "${ARGS[*]}" +) + +# execute command +echo "${PRE_COMMAND} ${COMMAND}" +${PRE_COMMAND} ${COMMAND} From 5fc345c0de89efd12d80a3b4af3036f2da44eeb4 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 16 Sep 2024 17:19:17 +0100 Subject: [PATCH 039/106] test: verify matrix with stable and nightly --- .forgejo/workflows/test.yml | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 5434bd4..956657a 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -5,20 +5,26 @@ on: jobs: test: runs-on: docker + strategy: + matrix: + toolchain: + - stable + - nightly + steps: - uses: actions/checkout@v4 - - name: Test + - name: Test ${{ toolchain}} uses: https://git.kemitix.net/kemitix/rust@next with: - args: cargo test + args: ${{toolchain}} cargo test - - name: Build + - name: Build ${{ toolchain }} uses: https://git.kemitix.net/kemitix/rust@next with: - args: cargo build + args: ${{ toolchain }} cargo build - - name: Run + - name: Run ${{ toolchain }} uses: https://git.kemitix.net/kemitix/rust@next with: - args: cargo run + args: ${{ toolchain }} cargo run From d9532aa17a6242ccfa678faf13275ab047219def Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 08:34:04 +0100 Subject: [PATCH 040/106] build: be more flexible in apt-get versions for docker image Also merges as we can't build without both in place: fix(build): revert invalid matrix syntax Back out "test: verify matrix with stable and nightly" This backs out commit 5fc345c0de89efd12d80a3b4af3036f2da44eeb4. --- .forgejo/workflows/test.yml | 18 ++++++------------ Dockerfile | 9 +-------- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 956657a..5434bd4 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -5,26 +5,20 @@ on: jobs: test: runs-on: docker - strategy: - matrix: - toolchain: - - stable - - nightly - steps: - uses: actions/checkout@v4 - - name: Test ${{ toolchain}} + - name: Test uses: https://git.kemitix.net/kemitix/rust@next with: - args: ${{toolchain}} cargo test + args: cargo test - - name: Build ${{ toolchain }} + - name: Build uses: https://git.kemitix.net/kemitix/rust@next with: - args: ${{ toolchain }} cargo build + args: cargo build - - name: Run ${{ toolchain }} + - name: Run uses: https://git.kemitix.net/kemitix/rust@next with: - args: ${{ toolchain }} cargo run + args: cargo run diff --git a/Dockerfile b/Dockerfile index 914accc..0eae36e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,14 +9,7 @@ FROM docker.io/rust:1.81.0-slim-bookworm # git - git RUN apt-get update \ && \ - apt-get install -y \ - --no-install-recommends \ - nodejs=18.19.0+dfsg-6~deb12u2 \ - curl=7.88.1-10+deb12u7 \ - pkg-config=1.8.1-1 \ - libssl-dev=3.0.14-1~deb12u2 \ - libdbus-1-dev=1.14.10-1~deb12u1 \ - git=1:2.39.2-1.1 \ + apt-get satisfy -y "nodejs (>=18.19.0) curl (>=7.88.1) pkg-config (>=1.8.1) libssl-dev (>=3.0.14) git (>=2.39.2)" \ && \ rm -r /var/lib/apt/lists/* From b352ee0e67b8bbd09696514ccd483ac92b4725e3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 16 Sep 2024 17:25:07 +0100 Subject: [PATCH 041/106] test: use correct matrix syntax --- .forgejo/workflows/test.yml | 12 +++++++++--- Dockerfile | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 5434bd4..54079b4 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -5,20 +5,26 @@ on: jobs: test: runs-on: docker + strategy: + matrix: + toolchain: + - name: stable + - name: nightly + steps: - uses: actions/checkout@v4 - name: Test uses: https://git.kemitix.net/kemitix/rust@next with: - args: cargo test + args: ${{ matrix.toolchain.name }} cargo test - name: Build uses: https://git.kemitix.net/kemitix/rust@next with: - args: cargo build + args: ${{ matrix.toolchain.name }} cargo build - name: Run uses: https://git.kemitix.net/kemitix/rust@next with: - args: cargo run + args: ${{ matrix.toolchain.name }} cargo run diff --git a/Dockerfile b/Dockerfile index 0eae36e..0803b86 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM docker.io/rust:1.81.0-slim-bookworm # git - git RUN apt-get update \ && \ - apt-get satisfy -y "nodejs (>=18.19.0) curl (>=7.88.1) pkg-config (>=1.8.1) libssl-dev (>=3.0.14) git (>=2.39.2)" \ + apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2)" \ && \ rm -r /var/lib/apt/lists/* From 3fa43fa7989fa8a9a4eddeb81e6fc1210d92faef Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 09:51:09 +0100 Subject: [PATCH 042/106] build: test against a specific version of rust --- .forgejo/workflows/test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 54079b4..102f1a2 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -10,6 +10,7 @@ jobs: toolchain: - name: stable - name: nightly + - name: v1.81.0 steps: - uses: actions/checkout@v4 From c6101c1e9eae85a11d37dfb42727a42e1e86e32f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 09:51:09 +0100 Subject: [PATCH 043/106] docs: fix typo in README --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c375b86..f432e3b 100644 --- a/README.md +++ b/README.md @@ -22,8 +22,8 @@ jobs: The `args` is one of the following: -- -- [ [nightly | stable | v1.xx.x] ] +- <COMMAND> +- [ nightly | stable | v1.xx.x ] <COMMAND> `COMMAND` is the command you want to run. The optional prefix is the Rust toolchain, or version. Allowed values are `nightly`, `stable` or a Rust version. From 8b9b16aa2ed0468af3aee43ae772754b6aaf3b56 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 10:39:41 +0100 Subject: [PATCH 044/106] fix: make rustfmt and clippy available to all toolchains --- Dockerfile | 3 +-- entrypoint.sh | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0803b86..11148b9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,8 +21,7 @@ RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9. RUN cargo binstall -y \ cargo-chef@0.1.67 \ cargo-hack@0.6.31 \ - release-plz@0.3.80 && \ - rustup component add rustfmt clippy + release-plz@0.3.80 COPY entrypoint.sh / diff --git a/entrypoint.sh b/entrypoint.sh index de787ef..3304c78 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -27,6 +27,7 @@ fi echo "Selected toolchain: ${TOOLCHAIN}" rustup update "${TOOLCHAIN}" +rustup component add rustfmt clippy if test "${ARGS[0]}" == "cargo";then PRE_COMMAND="cargo +${TOOLCHAIN} " From cdce2e30484ddb75813e58a960356224f71004a6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 10:42:06 +0100 Subject: [PATCH 045/106] build: less restrictive cargo-chef, cargo-hack and release-plz versions Allow patch version upgrades without intervention. --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 11148b9..2b3dca0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,9 +19,9 @@ RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9. mv cargo-binstall /usr/local/bin/ RUN cargo binstall -y \ - cargo-chef@0.1.67 \ - cargo-hack@0.6.31 \ - release-plz@0.3.80 + cargo-chef@0.1 \ + cargo-hack@0.6 \ + release-plz@0.3 COPY entrypoint.sh / From 18e606baa8ce1b2cf8ee0d4ae93604113961db11 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 10:54:04 +0100 Subject: [PATCH 046/106] fix: install rustfmt and clippy into correct toolchains --- entrypoint.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/entrypoint.sh b/entrypoint.sh index 3304c78..d39547b 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -27,7 +27,7 @@ fi echo "Selected toolchain: ${TOOLCHAIN}" rustup update "${TOOLCHAIN}" -rustup component add rustfmt clippy +rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy if test "${ARGS[0]}" == "cargo";then PRE_COMMAND="cargo +${TOOLCHAIN} " From 3daf1c7ccf9f451a3736e8a9f4b2bc43c9e3d06c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 10:58:08 +0100 Subject: [PATCH 047/106] test: test the cargo fmt and clippy work --- .forgejo/workflows/test.yml | 10 ++++++++++ entrypoint.sh | 4 +++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 102f1a2..ba6e2c9 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -15,6 +15,16 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Format + uses: https://git.kemitix.net/kemitix/rust@next + with: + args: ${{ matrix.toolchain.name }} cargo fmt --check + + - name: Clippy + uses: https://git.kemitix.net/kemitix/rust@next + with: + args: ${{ matrix.toolchain.name }} cargo clippy + - name: Test uses: https://git.kemitix.net/kemitix/rust@next with: diff --git a/entrypoint.sh b/entrypoint.sh index d39547b..195dda1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,7 +26,9 @@ if [[ "${ARGS[0]}" == v1* ]]; then fi echo "Selected toolchain: ${TOOLCHAIN}" +echo ">>> Update toolchain" rustup update "${TOOLCHAIN}" +echo ">>> Install rustfmt and clippy" rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy if test "${ARGS[0]}" == "cargo";then @@ -44,5 +46,5 @@ COMMAND=$( ) # execute command -echo "${PRE_COMMAND} ${COMMAND}" +echo ">>> ${PRE_COMMAND} ${COMMAND}" ${PRE_COMMAND} ${COMMAND} From 68a78fbaa356b91e64beb6d0d1b64e632b9bb228 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 11:31:52 +0100 Subject: [PATCH 048/106] feat: add libdbus-1-dev >=1.14.10 to image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 2b3dca0..f1642b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM docker.io/rust:1.81.0-slim-bookworm # git - git RUN apt-get update \ && \ - apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2)" \ + apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2) libdbus-1-dev (>= 1.14.10)" \ && \ rm -r /var/lib/apt/lists/* From d135d5869d41b09c76b9849a0f5cb645b711b68c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 11:38:57 +0100 Subject: [PATCH 049/106] fix: fix typo in Dockerfile --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index f1642b4..9a6009e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM docker.io/rust:1.81.0-slim-bookworm # git - git RUN apt-get update \ && \ - apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2) libdbus-1-dev (>= 1.14.10)" \ + apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2), libdbus-1-dev (>= 1.14.10)" \ && \ rm -r /var/lib/apt/lists/* From 75ceb6061c495c1da59200631ada8722a67d7aa7 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 17 Sep 2024 15:01:39 +0100 Subject: [PATCH 050/106] feat: add cargo machete to image --- .forgejo/workflows/test.yml | 5 +++++ Dockerfile | 1 + 2 files changed, 6 insertions(+) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index ba6e2c9..195e8c5 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -15,6 +15,11 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Machete + uses: https://git.kemitix.net/kemitix/rust@next + with: + args: cargo machete + - name: Format uses: https://git.kemitix.net/kemitix/rust@next with: diff --git a/Dockerfile b/Dockerfile index 9a6009e..0d98419 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,7 @@ RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9. RUN cargo binstall -y \ cargo-chef@0.1 \ cargo-hack@0.6 \ + cargo-machete@0.6.2 \ release-plz@0.3 COPY entrypoint.sh / From 1b5aa6396a98638ee89b3a439cc47d4a5032ea04 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Wed, 25 Sep 2024 09:06:57 +0100 Subject: [PATCH 051/106] feat: add libtag1-dev and libtagc0-dev (>=1.13) to image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0d98419..06eae58 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM docker.io/rust:1.81.0-slim-bookworm # git - git RUN apt-get update \ && \ - apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2), libdbus-1-dev (>= 1.14.10)" \ + apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2), libdbus-1-dev (>= 1.14.10), libtag1-dev (>= 1.13), libtagc0-dev (>= 1.13)" \ && \ rm -r /var/lib/apt/lists/* From decaab505d360eab3c0a818d3dd29874fdad01b5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 30 Sep 2024 22:30:31 +0100 Subject: [PATCH 052/106] feat: add xorg-dev libxcb-shape0-dev libxcb-xfixes0-dev to image --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 06eae58..e1ab388 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ FROM docker.io/rust:1.81.0-slim-bookworm # git - git RUN apt-get update \ && \ - apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2), libdbus-1-dev (>= 1.14.10), libtag1-dev (>= 1.13), libtagc0-dev (>= 1.13)" \ + apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2), libdbus-1-dev (>= 1.14.10), libtag1-dev (>= 1.13), libtagc0-dev (>= 1.13), xorg-dev (>=7.7), libxcb-shape0-dev (>=0.15), libxcb-xfixes0-dev (>=0.15)" \ && \ rm -r /var/lib/apt/lists/* From 870ac632683f85ce62bd3a14dfa8a58b06bb6bed Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 17 Oct 2024 19:44:10 +0100 Subject: [PATCH 053/106] docs: update version in examples in readme --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f432e3b..9d3c1ce 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ jobs: test: runs-on: docker steps: - - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 + - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 with: args: nightly cargo test - - uses: https://git.kemitix.net/kemitix/rust@v1.80.0 + - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 with: args: v1.79.0 cargo build ``` From 6ffa2b739c762923860d322a5f8ee547d2563d41 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 17 Oct 2024 23:47:42 +0000 Subject: [PATCH 054/106] chore(deps): update docker.io/rust docker tag to v1.82.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e1ab388..d54a4dc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.81.0-slim-bookworm +FROM docker.io/rust:1.82.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall From f710a7723047db2d435b2e3695807688f4888747 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 07:39:53 +0000 Subject: [PATCH 055/106] feat: only update toolchain if it is 'nightly' --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index 195dda1..c0946df 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,6 +15,8 @@ echo "Default toolchain: ${TOOLCHAIN}" if test "${ARGS[0]}" == "nightly"; then TOOLCHAIN="nightly" ARGS=("${ARGS[@]:1}") + echo ">>> Update nightly toolchain" + rustup update "${TOOLCHAIN}" fi if test "${ARGS[0]}" == "stable"; then TOOLCHAIN="stable" # redundant as this is the default @@ -26,8 +28,6 @@ if [[ "${ARGS[0]}" == v1* ]]; then fi echo "Selected toolchain: ${TOOLCHAIN}" -echo ">>> Update toolchain" -rustup update "${TOOLCHAIN}" echo ">>> Install rustfmt and clippy" rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy From 066233d1edd15c84ca7055c4ba13385e082b2e26 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 07:47:10 +0000 Subject: [PATCH 056/106] feat: add cargo-mutants@24.11 --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index d54a4dc..6dc37de 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,6 +22,7 @@ RUN cargo binstall -y \ cargo-chef@0.1 \ cargo-hack@0.6 \ cargo-machete@0.6.2 \ + cargo-mutants@24.11 \ release-plz@0.3 COPY entrypoint.sh / From 2167b80e63bf1ececcce296c1e55e5e8c9ab340e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 07:47:31 +0000 Subject: [PATCH 057/106] deps: bump cargo-machete from 0.6.2 to 0.7 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6dc37de..c745480 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9. RUN cargo binstall -y \ cargo-chef@0.1 \ cargo-hack@0.6 \ - cargo-machete@0.6.2 \ + cargo-machete@0.7 \ cargo-mutants@24.11 \ release-plz@0.3 From e99b290c26717b0bce211a5233eb9a8222789512 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 07:48:49 +0000 Subject: [PATCH 058/106] deps: bump cargo-binstall from 1.9.0 to 1.10.12 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c745480..aac1d00 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,7 @@ RUN apt-get update \ && \ rm -r /var/lib/apt/lists/* -RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.9.0/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ +RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.12/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ rm cargo-binstall.tgz && \ mv cargo-binstall /usr/local/bin/ From 87e22a6efcfa43059a433272fad3b61be9a10c5b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 09:08:24 +0000 Subject: [PATCH 059/106] docs: update version and contents in readme --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9d3c1ce..193c9bd 100644 --- a/README.md +++ b/README.md @@ -12,10 +12,10 @@ jobs: test: runs-on: docker steps: - - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + - uses: https://git.kemitix.net/kemitix/rust@v2.4.0 with: args: nightly cargo test - - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + - uses: https://git.kemitix.net/kemitix/rust@v2.4.0 with: args: v1.79.0 cargo build ``` @@ -27,8 +27,7 @@ The `args` is one of the following: `COMMAND` is the command you want to run. The optional prefix is the Rust toolchain, or version. Allowed values are `nightly`, `stable` or a Rust version. -Where the optional prefix is not given, the `stable` toolchain will be used. - +Where the optional prefix is not given, the `stable` toolchain will be used. The `stable` version is currently `1.82.0`. ## Contents @@ -37,6 +36,10 @@ Where the optional prefix is not given, the `stable` toolchain will be used. - git - cargo - cargo-binstall +- cargo-mutants +- cargo-chef +- cargo-hack +- release-plz ## Binary size From ef62a42e14ce91963d4017c361b0e7205a0e3f15 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 09:14:46 +0000 Subject: [PATCH 060/106] build: use pinned version of rust action Using a branch doesn't help as the action runners cache the action the first time they use it and don't update when the branch changes. --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 195e8c5..f6502a7 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@next + uses: https://git.kemitix.net/kemitix/rust@v2.3.0 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@next + uses: https://git.kemitix.net/kemitix/rust@v2.3.0 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@next + uses: https://git.kemitix.net/kemitix/rust@v2.3.0 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@next + uses: https://git.kemitix.net/kemitix/rust@v2.3.0 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@next + uses: https://git.kemitix.net/kemitix/rust@v2.3.0 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@next + uses: https://git.kemitix.net/kemitix/rust@v2.3.0 with: args: ${{ matrix.toolchain.name }} cargo run From 7b8d4a32df89669bdac398ff4f74e60b6dd7300e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 10:30:25 +0000 Subject: [PATCH 061/106] fix: revert only updating toolchain if nightly --- entrypoint.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index c0946df..195dda1 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -15,8 +15,6 @@ echo "Default toolchain: ${TOOLCHAIN}" if test "${ARGS[0]}" == "nightly"; then TOOLCHAIN="nightly" ARGS=("${ARGS[@]:1}") - echo ">>> Update nightly toolchain" - rustup update "${TOOLCHAIN}" fi if test "${ARGS[0]}" == "stable"; then TOOLCHAIN="stable" # redundant as this is the default @@ -28,6 +26,8 @@ if [[ "${ARGS[0]}" == v1* ]]; then fi echo "Selected toolchain: ${TOOLCHAIN}" +echo ">>> Update toolchain" +rustup update "${TOOLCHAIN}" echo ">>> Install rustfmt and clippy" rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy From 1e5a6defe266c593a48f360107e78f2bcbf50b24 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 14 Nov 2024 09:17:34 +0000 Subject: [PATCH 062/106] build: bump rust action to 2.4.1 --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index f6502a7..f834ddb 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.3.0 + uses: https://git.kemitix.net/kemitix/rust@v2.4.1 with: args: ${{ matrix.toolchain.name }} cargo run From 19070a34b89842fdd7774f4906ea21dd671d4a50 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 2 Dec 2024 22:03:01 +0000 Subject: [PATCH 063/106] chore(deps): update docker.io/rust docker tag to v1.83.0 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index aac1d00..c1986b1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.82.0-slim-bookworm +FROM docker.io/rust:1.83.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall From fcf7e37076f824e9422bee8524ce5075d6ce7d10 Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Mon, 2 Dec 2024 23:03:32 +0000 Subject: [PATCH 064/106] chore(deps): update kemitix/rust action to v2.5.0 --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index f834ddb..0883f3f 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.4.1 + uses: https://git.kemitix.net/kemitix/rust@v2.5.0 with: args: ${{ matrix.toolchain.name }} cargo run From 1af6efe6e2dc0ff651d84c4f8b5f86a0307a357f Mon Sep 17 00:00:00 2001 From: kemitix Date: Thu, 9 Jan 2025 17:26:55 +0000 Subject: [PATCH 065/106] chore(deps): update docker.io/rust docker tag to v1.84.0 Includes updating cargo-binstall to 1.10.19 --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c1986b1..1a51982 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM docker.io/rust:1.83.0-slim-bookworm +FROM docker.io/rust:1.84.0-slim-bookworm # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall @@ -13,7 +13,7 @@ RUN apt-get update \ && \ rm -r /var/lib/apt/lists/* -RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.12/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ +RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ rm cargo-binstall.tgz && \ mv cargo-binstall /usr/local/bin/ @@ -22,7 +22,7 @@ RUN cargo binstall -y \ cargo-chef@0.1 \ cargo-hack@0.6 \ cargo-machete@0.7 \ - cargo-mutants@24.11 \ + cargo-mutants@25.0 \ release-plz@0.3 COPY entrypoint.sh / From 961c02bcf9b875a8512d7017fb90bcd52b3026bc Mon Sep 17 00:00:00 2001 From: Renovate Bot Date: Thu, 9 Jan 2025 17:43:03 +0000 Subject: [PATCH 066/106] chore(deps): update https://git.kemitix.net/kemitix/rust action to v2.5.1 --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 0883f3f..d459ae6 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.5.0 + uses: https://git.kemitix.net/kemitix/rust@v2.5.1 with: args: ${{ matrix.toolchain.name }} cargo run From 5b2365e925af11e5f010ef3d9de9e585d0519153 Mon Sep 17 00:00:00 2001 From: kemitix Date: Thu, 9 Jan 2025 17:26:55 +0000 Subject: [PATCH 067/106] build: build and publish image nightly Removes need to update toolchain for every action step --- .forgejo/workflows/build-image.yml | 18 +++++++++++++++++ Dockerfile | 9 +++++++++ entrypoint.sh | 5 ----- update.sh | 32 ++++++++++++++++++++++++++++++ 4 files changed, 59 insertions(+), 5 deletions(-) create mode 100644 .forgejo/workflows/build-image.yml create mode 100755 update.sh diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml new file mode 100644 index 0000000..452dd89 --- /dev/null +++ b/.forgejo/workflows/build-image.yml @@ -0,0 +1,18 @@ +on: + schedule: + - cron: '30 1 * * *' + workflow_dispatch: + +jobs: + build: + runs-on: docker + + steps: + - name: Checkout + uses: actions/checkoutv4 + + - name: Build + run: docker build . -t git.kemitix.net/kemitix/rust:latest + + - name: Publish + run: docker push git.kemitix.net/kemitix/rust:latest diff --git a/Dockerfile b/Dockerfile index 1a51982..6abceb7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,7 @@ FROM docker.io/rust:1.84.0-slim-bookworm +LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust + # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall # clang-16 & mold - faster linkers for rust @@ -25,6 +27,13 @@ RUN cargo binstall -y \ cargo-mutants@25.0 \ release-plz@0.3 +COPY update.sh / + +# should be a no-op if the FROM line is up-to-date +RUN /update.sh stable + +RUN /update.sh nightly + COPY entrypoint.sh / RUN git config --global user.email "action@git.kemitix.net" && \ diff --git a/entrypoint.sh b/entrypoint.sh index 195dda1..7971454 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -26,11 +26,6 @@ if [[ "${ARGS[0]}" == v1* ]]; then fi echo "Selected toolchain: ${TOOLCHAIN}" -echo ">>> Update toolchain" -rustup update "${TOOLCHAIN}" -echo ">>> Install rustfmt and clippy" -rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy - if test "${ARGS[0]}" == "cargo";then PRE_COMMAND="cargo +${TOOLCHAIN} " else diff --git a/update.sh b/update.sh new file mode 100755 index 0000000..957870d --- /dev/null +++ b/update.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash + +set -e + +echo "INPUT_ARGS: ${INPUT_ARGS}" + +# split input into an array +read -ra ARGS <<<"${INPUT_ARGS}" + +# default toolchain +TOOLCHAIN="stable" +echo "Default toolchain: ${TOOLCHAIN}" + +# if first parameter is 'nightly'... +if test "${ARGS[0]}" == "nightly"; then + TOOLCHAIN="nightly" + ARGS=("${ARGS[@]:1}") +fi +if test "${ARGS[0]}" == "stable"; then + TOOLCHAIN="stable" # redundant as this is the default + ARGS=("${ARGS[@]:1}") +fi +if [[ "${ARGS[0]}" == v1* ]]; then + TOOLCHAIN="${ARGS[0]:1}" + ARGS=("${ARGS[@]:1}") +fi +echo "Selected toolchain: ${TOOLCHAIN}" + +echo ">>> Update toolchain" +rustup update "${TOOLCHAIN}" +echo ">>> Install rustfmt and clippy" +rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy From d9d3dd6bf7622df981b766d646e47aa0786bca52 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 10 Jan 2025 20:27:27 +0000 Subject: [PATCH 068/106] build: fix typo --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 452dd89..c8ec64d 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -9,7 +9,7 @@ jobs: steps: - name: Checkout - uses: actions/checkoutv4 + uses: actions/checkout@v4 - name: Build run: docker build . -t git.kemitix.net/kemitix/rust:latest From 8019e1e24714f034bca1f6fd7aecd9d135fad11f Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 10 Jan 2025 20:59:47 +0000 Subject: [PATCH 069/106] build: run action on dind --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index c8ec64d..f9cac07 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -5,7 +5,7 @@ on: jobs: build: - runs-on: docker + runs-on: dind steps: - name: Checkout From 17860073ec4a31a228d054413a05e6c7e02bd440 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Fri, 10 Jan 2025 21:12:04 +0000 Subject: [PATCH 070/106] build: run on ubuntu-latest --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index f9cac07..a6edeaf 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -5,7 +5,7 @@ on: jobs: build: - runs-on: dind + runs-on: ubuntu-latest steps: - name: Checkout From 4179c0c716423955d81c6f598b105800aa8b0ccb Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 08:15:40 +0000 Subject: [PATCH 071/106] build: add docker login step --- .forgejo/workflows/build-image.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index a6edeaf..e58a640 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -14,5 +14,8 @@ jobs: - name: Build run: docker build . -t git.kemitix.net/kemitix/rust:latest + - name: Login + run: docker login git.kemitix.net + - name: Publish run: docker push git.kemitix.net/kemitix/rust:latest From 6e8d6b6e63e7b037c45980f3fcad1d497fd2f4b1 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 16:56:07 +0000 Subject: [PATCH 072/106] build: use credentials to login --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index e58a640..931e1b1 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -15,7 +15,7 @@ jobs: run: docker build . -t git.kemitix.net/kemitix/rust:latest - name: Login - run: docker login git.kemitix.net + run: docker login --username kemitix --password ${FORGE_USER_PASSWORD} git.kemitix.net - name: Publish run: docker push git.kemitix.net/kemitix/rust:latest From 362a4cd064d543669e2322d120ec1ab79cd646af Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 17:05:37 +0000 Subject: [PATCH 073/106] build: get password from secrets --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 931e1b1..f3c267b 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -15,7 +15,7 @@ jobs: run: docker build . -t git.kemitix.net/kemitix/rust:latest - name: Login - run: docker login --username kemitix --password ${FORGE_USER_PASSWORD} git.kemitix.net + run: docker login --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} git.kemitix.net - name: Publish run: docker push git.kemitix.net/kemitix/rust:latest From 2820a223b46a4f9cdf5443c62ae78317a3ec096b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 17:10:52 +0000 Subject: [PATCH 074/106] build: add 'mise run test' --- .gitignore | 1 + mise.toml | 10 ++++++++++ 2 files changed, 11 insertions(+) create mode 100644 mise.toml diff --git a/.gitignore b/.gitignore index ea8c4bf..96ef6c0 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /target +Cargo.lock diff --git a/mise.toml b/mise.toml new file mode 100644 index 0000000..0d130ca --- /dev/null +++ b/mise.toml @@ -0,0 +1,10 @@ +[tasks.test] +description = "Test the image" +run = [ + "cargo machete", + "cargo fmt --check", + "cargo clippy", + "cargo test", + "cargo build", + "cargo run" +] From 0a69149418fe493dc30b214dbd54dd85eb21cdb6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 18:17:18 +0000 Subject: [PATCH 075/106] build: install nightly --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 6abceb7..d7f28aa 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,7 +32,7 @@ COPY update.sh / # should be a no-op if the FROM line is up-to-date RUN /update.sh stable -RUN /update.sh nightly +RUN rustup install nightly && /update.sh nightly COPY entrypoint.sh / From 1a5bd83c1e9ba8e7e1e963db96c9bc9b99dfae79 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 18:23:57 +0000 Subject: [PATCH 076/106] build: clear previous version from cache --- .forgejo/workflows/build-image.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index f3c267b..2ddc177 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -11,6 +11,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Clear image from cache + run: | + docker rmi git.kemitix.net/kemitix/rust:latest + docker system prune --force --all + - name: Build run: docker build . -t git.kemitix.net/kemitix/rust:latest From 856cce5c03be03ce2ae811afb6c3af19b3538a64 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 20:04:51 +0000 Subject: [PATCH 077/106] build: install nightly and v1.74.1 directly in dockerfile Switching test from 1.81.0 to 1.74.1 to match an MSRV that I actually use. --- .forgejo/workflows/test.yml | 2 +- Dockerfile | 10 ++++++---- update.sh | 32 -------------------------------- 3 files changed, 7 insertions(+), 37 deletions(-) delete mode 100755 update.sh diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index d459ae6..3058125 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -10,7 +10,7 @@ jobs: toolchain: - name: stable - name: nightly - - name: v1.81.0 + - name: v1.74.1 steps: - uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index d7f28aa..fcd27d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,12 +27,14 @@ RUN cargo binstall -y \ cargo-mutants@25.0 \ release-plz@0.3 -COPY update.sh / - # should be a no-op if the FROM line is up-to-date -RUN /update.sh stable +RUN rustup update stable && rustup component add --toolchain stable rustfmt clippy -RUN rustup install nightly && /update.sh nightly +# install nightly +RUN rustup install nightly && rustup component add --toolchain nightly rustfmt clippy + +# install v1.74.1 +RUN rustup install 1.74.1 && rustup component add --toolchain 1.74.1 rustfmt clippy COPY entrypoint.sh / diff --git a/update.sh b/update.sh deleted file mode 100755 index 957870d..0000000 --- a/update.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "INPUT_ARGS: ${INPUT_ARGS}" - -# split input into an array -read -ra ARGS <<<"${INPUT_ARGS}" - -# default toolchain -TOOLCHAIN="stable" -echo "Default toolchain: ${TOOLCHAIN}" - -# if first parameter is 'nightly'... -if test "${ARGS[0]}" == "nightly"; then - TOOLCHAIN="nightly" - ARGS=("${ARGS[@]:1}") -fi -if test "${ARGS[0]}" == "stable"; then - TOOLCHAIN="stable" # redundant as this is the default - ARGS=("${ARGS[@]:1}") -fi -if [[ "${ARGS[0]}" == v1* ]]; then - TOOLCHAIN="${ARGS[0]:1}" - ARGS=("${ARGS[@]:1}") -fi -echo "Selected toolchain: ${TOOLCHAIN}" - -echo ">>> Update toolchain" -rustup update "${TOOLCHAIN}" -echo ">>> Install rustfmt and clippy" -rustup component add --toolchain "${TOOLCHAIN}" rustfmt clippy From cb915104cbb2f2f5d33f443441108a590f53f4bd Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 11 Jan 2025 20:18:43 +0000 Subject: [PATCH 078/106] build: bump rust action to 2.6.0-rc3 --- .forgejo/workflows/test.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 3058125..590229b 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -16,31 +16,31 @@ jobs: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.5.1 + uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 with: args: ${{ matrix.toolchain.name }} cargo run From da790827d486009d2f5252de9d097ff5c2968ead Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 11:18:19 +0000 Subject: [PATCH 079/106] feat: drop entrypoint in favour of using 'run' over 'uses' --- .forgejo/workflows/test.yml | 29 +++++++++--------------- Dockerfile | 10 ++++----- entrypoint.sh | 45 ------------------------------------- 3 files changed, 14 insertions(+), 70 deletions(-) delete mode 100755 entrypoint.sh diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 590229b..307fdfb 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -5,42 +5,33 @@ on: jobs: test: runs-on: docker + container: + image: + git.kemitix.net/kemitix/rust:v3.0.0-rc2 strategy: matrix: toolchain: - name: stable - name: nightly - - name: v1.74.1 + - name: 1.74.1 steps: - uses: actions/checkout@v4 - name: Machete - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: cargo machete + run: cargo machete - name: Format - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo fmt --check + run: cargo +${{ matrix.toolchain.name }} fmt --check - name: Clippy - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo clippy + run: cargo +${{ matrix.toolchain.name }} clippy - name: Test - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo test + run: cargo +${{ matrix.toolchain.name }} test - name: Build - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo build + run: cargo +${{ matrix.toolchain.name }} build - name: Run - uses: https://git.kemitix.net/kemitix/rust@v2.6.0-rc3 - with: - args: ${{ matrix.toolchain.name }} cargo run + run: cargo +${{ matrix.toolchain.name }} run diff --git a/Dockerfile b/Dockerfile index fcd27d4..23b5fdd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,18 +27,16 @@ RUN cargo binstall -y \ cargo-mutants@25.0 \ release-plz@0.3 +# install v1.74.1 +RUN rustup install 1.74.1 && rustup component add --toolchain 1.74.1 rustfmt clippy + # should be a no-op if the FROM line is up-to-date RUN rustup update stable && rustup component add --toolchain stable rustfmt clippy # install nightly RUN rustup install nightly && rustup component add --toolchain nightly rustfmt clippy -# install v1.74.1 -RUN rustup install 1.74.1 && rustup component add --toolchain 1.74.1 rustfmt clippy - -COPY entrypoint.sh / - RUN git config --global user.email "action@git.kemitix.net" && \ git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" -ENTRYPOINT [ "/entrypoint.sh" ] +WORKDIR /app diff --git a/entrypoint.sh b/entrypoint.sh deleted file mode 100755 index 7971454..0000000 --- a/entrypoint.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/usr/bin/env bash - -set -e - -echo "INPUT_ARGS: ${INPUT_ARGS}" - -# split input into an array -read -ra ARGS <<<"${INPUT_ARGS}" - -# default toolchain -TOOLCHAIN="stable" -echo "Default toolchain: ${TOOLCHAIN}" - -# if first parameter is 'nightly'... -if test "${ARGS[0]}" == "nightly"; then - TOOLCHAIN="nightly" - ARGS=("${ARGS[@]:1}") -fi -if test "${ARGS[0]}" == "stable"; then - TOOLCHAIN="stable" # redundant as this is the default - ARGS=("${ARGS[@]:1}") -fi -if [[ "${ARGS[0]}" == v1* ]]; then - TOOLCHAIN="${ARGS[0]:1}" - ARGS=("${ARGS[@]:1}") -fi -echo "Selected toolchain: ${TOOLCHAIN}" - -if test "${ARGS[0]}" == "cargo";then - PRE_COMMAND="cargo +${TOOLCHAIN} " -else - PRE_COMMAND="${ARGS[0]}" -fi -ARGS=("${ARGS[@]:1}") - -# ensure toolchain is up-to-date -# recombine remaining arguments -COMMAND=$( - IFS=" " - echo "${ARGS[*]}" -) - -# execute command -echo ">>> ${PRE_COMMAND} ${COMMAND}" -${PRE_COMMAND} ${COMMAND} From 766156841b016d2a80f1fa86c251d26dfe13bd46 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 11:18:19 +0000 Subject: [PATCH 080/106] feat: drop entrypoint in favour of using 'run' over 'uses' --- .forgejo/workflows/test.yml | 2 +- README.md | 36 ++++++++++++++---------------------- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/test.yml index 307fdfb..4a12799 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/test.yml @@ -7,7 +7,7 @@ jobs: runs-on: docker container: image: - git.kemitix.net/kemitix/rust:v3.0.0-rc2 + git.kemitix.net/kemitix/rust:v3.0.0 strategy: matrix: toolchain: diff --git a/README.md b/README.md index 193c9bd..f3637c6 100644 --- a/README.md +++ b/README.md @@ -11,23 +11,25 @@ on: [push] jobs: test: runs-on: docker + container: + image: + git.kemitix.net/kemitix/rust:v3.0.0 steps: - - uses: https://git.kemitix.net/kemitix/rust@v2.4.0 - with: - args: nightly cargo test - - uses: https://git.kemitix.net/kemitix/rust@v2.4.0 - with: - args: v1.79.0 cargo build + - name: test with nightly + run: cargo +nightly test + - name: build with v1.74.1 + run: cargo +1.74.1 cargo build + - name: test with stable + run: cargo test ``` -The `args` is one of the following: +## Toolchains -- <COMMAND> -- [ nightly | stable | v1.xx.x ] <COMMAND> +The available toolchain in the image are: -`COMMAND` is the command you want to run. The optional prefix is the Rust toolchain, or version. Allowed values are `nightly`, `stable` or a Rust version. - -Where the optional prefix is not given, the `stable` toolchain will be used. The `stable` version is currently `1.82.0`. +- `nightly` +- stable +- 1.74.1 ## Contents @@ -40,13 +42,3 @@ Where the optional prefix is not given, the `stable` toolchain will be used. The - cargo-chef - cargo-hack - release-plz - -## Binary size - -To reduce the size of the debug binary, add the following to the `.cargo/config.toml` file in you project. - -```toml -[profile.dev] -debug = 0 -strip = "debuginfo" -``` From 70e801e03c2e4ecb1e15d9f9e2b6d65e2596d9d3 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 11:18:19 +0000 Subject: [PATCH 081/106] build: handle removing existing images when there are none --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 2ddc177..18041ad 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -13,7 +13,7 @@ jobs: - name: Clear image from cache run: | - docker rmi git.kemitix.net/kemitix/rust:latest + docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs docker rmi docker system prune --force --all - name: Build From 5a5942c4807541fd78f1b76e1e7f2c495dc68fb6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 18:56:43 +0000 Subject: [PATCH 082/106] build: delete images safely and securily - xargs -r -- only run the docker rmi command if there are images to delete - --force -- delete even if used --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 18041ad..760ae58 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -13,7 +13,7 @@ jobs: - name: Clear image from cache run: | - docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs docker rmi + docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs -r docker rmi --force docker system prune --force --all - name: Build From d6ea7a689e17ff1c2bb1603237b27d33a54df402 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 19:01:58 +0000 Subject: [PATCH 083/106] build: use env to get name of repo --- .forgejo/workflows/build-image.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 760ae58..149b3d7 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -13,14 +13,14 @@ jobs: - name: Clear image from cache run: | - docker images git.kemitix.net/kemitix/rust -q | sort -u | xargs -r docker rmi --force + docker images git.kemitix.net/${{ env.GITHUB_REPOSITORY }} -q | sort -u | xargs -r docker rmi --force docker system prune --force --all - name: Build - run: docker build . -t git.kemitix.net/kemitix/rust:latest + run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest - name: Login - run: docker login --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} git.kemitix.net + run: docker login git.kemiti.net --username kemitix --password ${{ env.GITHUB_TOKEN }} - name: Publish - run: docker push git.kemitix.net/kemitix/rust:latest + run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest From 1f659c13ab78b8b28b09c7b1bb14c0b7dd5d4367 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 19:15:15 +0000 Subject: [PATCH 084/106] build: fix typo --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index 149b3d7..c195831 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -20,7 +20,7 @@ jobs: run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest - name: Login - run: docker login git.kemiti.net --username kemitix --password ${{ env.GITHUB_TOKEN }} + run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} - name: Publish run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest From 1a890522442bfa472c8f865817d8ddc15ce6d82a Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sun, 12 Jan 2025 19:44:00 +0000 Subject: [PATCH 085/106] build: use correct env var for auth --- .forgejo/workflows/build-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index c195831..d5c200e 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -20,7 +20,7 @@ jobs: run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest - name: Login - run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGE_USER_PASSWORD }} + run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGEJO_TOKEN_WRITE_PACKAGE }} - name: Publish run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest From 5d372a60de083347dc9bd7b16b27cb96880d89f6 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 13 Jan 2025 08:43:00 +0000 Subject: [PATCH 086/106] build: check for ignored files being included in repo --- .forgejo/workflows/{test.yml => push-next.yml} | 9 +++++++++ 1 file changed, 9 insertions(+) rename .forgejo/workflows/{test.yml => push-next.yml} (75%) diff --git a/.forgejo/workflows/test.yml b/.forgejo/workflows/push-next.yml similarity index 75% rename from .forgejo/workflows/test.yml rename to .forgejo/workflows/push-next.yml index 4a12799..f17055e 100644 --- a/.forgejo/workflows/test.yml +++ b/.forgejo/workflows/push-next.yml @@ -18,6 +18,15 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Ignored Files + run: | + IGNORED=$(git ls-files --cached -i --exclude-standard) + if [ -n "$IGNORED" ] + then + echo "Ignored files present:\n$IGNORED" + exit 1 + fi + - name: Machete run: cargo machete From b853a6acec97ae5e29de7917461fa56c24798d3e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 13 Jan 2025 09:04:18 +0000 Subject: [PATCH 087/106] feat: add `check-for-ignored` script Checks for ignored files that have been tracked by git. --- Dockerfile | 2 ++ README.md | 15 +++++++++++++++ scripts/check-for-ignored | 30 ++++++++++++++++++++++++++++++ 3 files changed, 47 insertions(+) create mode 100755 scripts/check-for-ignored diff --git a/Dockerfile b/Dockerfile index 23b5fdd..4c4011c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,4 +39,6 @@ RUN rustup install nightly && rustup component add --toolchain nightly rustfmt c RUN git config --global user.email "action@git.kemitix.net" && \ git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" +COPY scripts/ /usr/local/bin/ + WORKDIR /app diff --git a/README.md b/README.md index f3637c6..9e42799 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,18 @@ The available toolchain in the image are: - cargo-chef - cargo-hack - release-plz + +### Scripts + +- `check-for-ignored` + +Checks for files that are being tracked by Git but should be ignored according +to the `.gitignore` file. + +#### Usage + +```yaml +steps: + - name: Check for Ignored Files + run: check-for-ignored +``` diff --git a/scripts/check-for-ignored b/scripts/check-for-ignored new file mode 100755 index 0000000..90f8626 --- /dev/null +++ b/scripts/check-for-ignored @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +# Exit on error +set -e + +# Check if git is installed +if ! command -v git &> /dev/null; then + echo "Error: git is not installed" + exit 1 +fi + +# Check if we're in a git repository +if ! git rev-parse --is-inside-work-tree &> /dev/null; then + echo "Error: not in a git repository" + exit 1 +fi + +echo "Checking for tracked files that should be ignored..." + +# Find files that are both tracked and ignored +ignored_files=$(git ls-files --cached -i --exclude-standard) + +if [[ -z "$ignored_files" ]]; then + echo "No tracked files are marked as ignored" + exit 0 +else + echo "The following tracked files are marked as ignored:" + echo "$ignored_files" + exit 1 +fi From 3941fe6a1fb3cf34a9f7ab4c4d40ef2996651dc0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Mon, 13 Jan 2025 09:04:18 +0000 Subject: [PATCH 088/106] build: use check-for-ignored --- .forgejo/workflows/push-next.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index f17055e..391d3b7 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -7,7 +7,7 @@ jobs: runs-on: docker container: image: - git.kemitix.net/kemitix/rust:v3.0.0 + git.kemitix.net/kemitix/rust:latest strategy: matrix: toolchain: @@ -19,13 +19,14 @@ jobs: - uses: actions/checkout@v4 - name: Ignored Files - run: | - IGNORED=$(git ls-files --cached -i --exclude-standard) - if [ -n "$IGNORED" ] - then - echo "Ignored files present:\n$IGNORED" - exit 1 - fi + run: check-for-ignored + # run: | + # IGNORED=$(git ls-files --cached -i --exclude-standard) + # if [ -n "$IGNORED" ] + # then + # echo "Ignored files present:\n$IGNORED" + # exit 1 + # fi - name: Machete run: cargo machete From 6d50289a357d511e97a9ebf26d7b3e4926475288 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 07:53:51 +0000 Subject: [PATCH 089/106] build: replace debian base with alpine linux --- Dockerfile | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 4c4011c..7e8529e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,15 @@ -FROM docker.io/rust:1.84.0-slim-bookworm +FROM docker.io/rust:1.84.0-alpine3.21 LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust # nodejs - runtime used by forgejo/github actions # curl - to download cargo-binstall -# clang-16 & mold - faster linkers for rust -# pkg-config - required to compile some rust `-sys` packages -# libssl-dev - build dependency for git-next -# libdbus-1-dev - linux os interop (e.g. desktop notifications) +# clang & mold - faster linkers for rust +# pkgconfig - required to compile some rust `-sys` packages +# openssl-dev - build dependency for git-next +# dbus-dev - linux os interop (e.g. desktop notifications) # git - git -RUN apt-get update \ - && \ - apt-get satisfy -y "nodejs (>=18.19.0), curl (>=7.88.1), pkg-config (>=1.8.1), libssl-dev (>=3.0.14), git (>=2.39.2), libdbus-1-dev (>= 1.14.10), libtag1-dev (>= 1.13), libtagc0-dev (>= 1.13), xorg-dev (>=7.7), libxcb-shape0-dev (>=0.15), libxcb-xfixes0-dev (>=0.15)" \ - && \ - rm -r /var/lib/apt/lists/* +RUN apk add nodejs curl clang pkgconfig mold openssl-dev dbus-dev git RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ From 7ab30ce7c30e20246112d31829b937247a18729d Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 09:06:08 +0000 Subject: [PATCH 090/106] feat: add bash to image --- .forgejo/workflows/push-next.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 391d3b7..6c800c1 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -7,7 +7,7 @@ jobs: runs-on: docker container: image: - git.kemitix.net/kemitix/rust:latest + git.kemitix.net/kemitix/rust:v3.1.0 strategy: matrix: toolchain: diff --git a/Dockerfile b/Dockerfile index 7e8529e..34f2553 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust # openssl-dev - build dependency for git-next # dbus-dev - linux os interop (e.g. desktop notifications) # git - git -RUN apk add nodejs curl clang pkgconfig mold openssl-dev dbus-dev git +RUN apk add nodejs curl clang pkgconfig mold openssl-dev dbus-dev git bash RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ From 9a12ffc5fcf54f5cd1f8cee974d8ce2d85a3e6d8 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:09:30 +0000 Subject: [PATCH 091/106] chore: add build recipe to justfile --- justfile | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 justfile diff --git a/justfile b/justfile new file mode 100644 index 0000000..2071a21 --- /dev/null +++ b/justfile @@ -0,0 +1,2 @@ +build: + docker build . -t git.kemitix.net/kemitix/rust:latest From 6aa876047af109889749d3e08369b6ac62cfa750 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:09:30 +0000 Subject: [PATCH 092/106] fix: should build with libssl dependency --- Cargo.toml | 1 + examples/native-tls.rs | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 examples/native-tls.rs diff --git a/Cargo.toml b/Cargo.toml index 7d75412..133dad7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,3 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] +native-tls = "0.2" diff --git a/examples/native-tls.rs b/examples/native-tls.rs new file mode 100644 index 0000000..32acc40 --- /dev/null +++ b/examples/native-tls.rs @@ -0,0 +1,15 @@ +use native_tls::TlsConnector; +use std::io::{Read, Write}; +use std::net::TcpStream; + +fn main() { + let connector = TlsConnector::new().unwrap(); + + let stream = TcpStream::connect("google.com:443").unwrap(); + let mut stream = connector.connect("google.com", stream).unwrap(); + + stream.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap(); + let mut res = vec![]; + stream.read_to_end(&mut res).unwrap(); + println!("{}", String::from_utf8_lossy(&res)); +} From 2c8b4776d9ea486ff49eeacfca1cb6d7a69c4227 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:09:30 +0000 Subject: [PATCH 093/106] chore: use --no-chache and libssl3 + build-base packages --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 34f2553..80e35d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust # openssl-dev - build dependency for git-next # dbus-dev - linux os interop (e.g. desktop notifications) # git - git -RUN apk add nodejs curl clang pkgconfig mold openssl-dev dbus-dev git bash +RUN apk add --no-cache nodejs curl clang pkgconfig mold libssl3 openssl-dev build-base dbus-dev git bash RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ From 28d34eb85d413d53441423fe26cc1a2f8267600b Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 094/106] fix: remove rust 1.74.1 --- .forgejo/workflows/push-next.yml | 1 - Dockerfile | 3 --- 2 files changed, 4 deletions(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 6c800c1..4a57795 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -13,7 +13,6 @@ jobs: toolchain: - name: stable - name: nightly - - name: 1.74.1 steps: - uses: actions/checkout@v4 diff --git a/Dockerfile b/Dockerfile index 80e35d8..fa25064 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,6 @@ RUN cargo binstall -y \ cargo-mutants@25.0 \ release-plz@0.3 -# install v1.74.1 -RUN rustup install 1.74.1 && rustup component add --toolchain 1.74.1 rustfmt clippy - # should be a no-op if the FROM line is up-to-date RUN rustup update stable && rustup component add --toolchain stable rustfmt clippy From 4bd50bdadff89a472c362f115a0078a02c7f4747 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 095/106] build: justfile adds test and shell recipes --- justfile | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/justfile b/justfile index 2071a21..c1a8fa3 100644 --- a/justfile +++ b/justfile @@ -1,2 +1,10 @@ +image := "git.kemitix.get/kemitix/rust:test" + build: - docker build . -t git.kemitix.net/kemitix/rust:latest + docker build . -t {{ image }} + +test: build + docker run --rm -v $PWD:/app/ {{ image }} cargo test + +shell: build + docker run --rm -it -v $PWD:/app/ {{ image }} bash From e2f2015e062e5e254e92358ec13d237e8d22b9c5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 096/106] test: add regression test for native-tls crate --- Cargo.toml | 2 +- src/main.rs | 10 ++++++++++ examples/native-tls.rs => src/tls.rs | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) rename examples/native-tls.rs => src/tls.rs (96%) diff --git a/Cargo.toml b/Cargo.toml index 133dad7..7fa380b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,4 +4,4 @@ version = "0.1.0" edition = "2021" [dependencies] -native-tls = "0.2" +native-tls = { version = "0.2", features = ["vendored"] } diff --git a/src/main.rs b/src/main.rs index e7a11a9..f39eee9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,13 @@ +mod tls; fn main() { println!("Hello, world!"); + tls::main(); +} + +#[cfg(test)] +mod tests { + #[test] + fn passes() { + println!("passes okay"); + } } diff --git a/examples/native-tls.rs b/src/tls.rs similarity index 96% rename from examples/native-tls.rs rename to src/tls.rs index 32acc40..f4cb49c 100644 --- a/examples/native-tls.rs +++ b/src/tls.rs @@ -2,7 +2,7 @@ use native_tls::TlsConnector; use std::io::{Read, Write}; use std::net::TcpStream; -fn main() { +pub fn main() { let connector = TlsConnector::new().unwrap(); let stream = TcpStream::connect("google.com:443").unwrap(); From f1a2ae0311fb5c63550685fa398f9135103dd5ac Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 097/106] feat: install most apks later --- Dockerfile | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index fa25064..126dadf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,15 +2,7 @@ FROM docker.io/rust:1.84.0-alpine3.21 LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust -# nodejs - runtime used by forgejo/github actions -# curl - to download cargo-binstall -# clang & mold - faster linkers for rust -# pkgconfig - required to compile some rust `-sys` packages -# openssl-dev - build dependency for git-next -# dbus-dev - linux os interop (e.g. desktop notifications) -# git - git -RUN apk add --no-cache nodejs curl clang pkgconfig mold libssl3 openssl-dev build-base dbus-dev git bash - +RUN apk add --no-cache curl=8.11.1-r0 RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ tar -xzf cargo-binstall.tgz && \ rm cargo-binstall.tgz && \ @@ -24,11 +16,37 @@ RUN cargo binstall -y \ release-plz@0.3 # should be a no-op if the FROM line is up-to-date -RUN rustup update stable && rustup component add --toolchain stable rustfmt clippy +RUN rustup update stable + +RUN rustup component add rustfmt clippy # install nightly RUN rustup install nightly && rustup component add --toolchain nightly rustfmt clippy +# nodejs - runtime used by forgejo/github actions +# curl - to download cargo-binstall +# clang & mold - faster linkers for rust +# pkgconfig - required to compile some rust `-sys` packages +# openssl-dev - build dependency for git-next +# dbus-dev - linux os interop (e.g. desktop notifications) +# perl - native-tls(vendored) +# git - git +RUN apk add --no-cache \ + bash \ + nodejs \ + build-base \ + pkgconfig \ + libssl3 \ + openssl-dev \ + perl \ + git + + # clang \ + + # mold \ + + # dbus-dev \ + RUN git config --global user.email "action@git.kemitix.net" && \ git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" From 0c1f4ba125105ac9b91d8253ced4c6bfac099ae0 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 098/106] docs: update readme to include caveat --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 9e42799..6a73835 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ The available toolchain in the image are: - cargo-chef - cargo-hack - release-plz +- perl ### Scripts @@ -57,3 +58,13 @@ steps: - name: Check for Ignored Files run: check-for-ignored ``` + +## Caveats + +### native-tls + +This crate *must* use the `vendored` feature in order to compile in the Alpine Linux image. + +```toml +native-tls = { version = "0.2", features = ["vendored"] } +``` From 97f794a36e7a7630dd36b07b900d47851c895a9e Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 099/106] build: add clippy recipe to justfile --- justfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/justfile b/justfile index c1a8fa3..30f08b2 100644 --- a/justfile +++ b/justfile @@ -6,5 +6,8 @@ build: test: build docker run --rm -v $PWD:/app/ {{ image }} cargo test +clippy: build + docker run --rm -v $PWD:/app/ {{ image }} cargo clippy + shell: build docker run --rm -it -v $PWD:/app/ {{ image }} bash From ee426b1a430de8b5ad245f7a2d035cb1400bc5fe Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:52:01 +0000 Subject: [PATCH 100/106] fix: should build with kxio dependency --- Cargo.toml | 2 + justfile | 3 ++ src/kxio.rs | 105 ++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main.rs | 8 +++- 4 files changed, 117 insertions(+), 1 deletion(-) create mode 100644 src/kxio.rs diff --git a/Cargo.toml b/Cargo.toml index 7fa380b..41fa947 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,4 +4,6 @@ version = "0.1.0" edition = "2021" [dependencies] +kxio = "5.0" native-tls = { version = "0.2", features = ["vendored"] } +tokio = { version = "1.43", features = ["full"] } diff --git a/justfile b/justfile index 30f08b2..b5f2749 100644 --- a/justfile +++ b/justfile @@ -9,5 +9,8 @@ test: build clippy: build docker run --rm -v $PWD:/app/ {{ image }} cargo clippy +run: build + docker run --rm -v $PWD:/app/ {{ image }} cargo run + shell: build docker run --rm -it -v $PWD:/app/ {{ image }} bash diff --git a/src/kxio.rs b/src/kxio.rs new file mode 100644 index 0000000..1d56825 --- /dev/null +++ b/src/kxio.rs @@ -0,0 +1,105 @@ +/// This is an example to show fetching a file from a webiste and saving to a file +/// +/// The example consts of: +/// +/// - The main program, in `main()` - demonstrates how to setup `kxio` for use in prod +/// - A test module - demonstrates how to use `kxio` in tests +/// - sample functions - showing how to use `kxio` the body of your program, and be testable +/// +/// NOTE: running this program with `cargo run --example get` will create and delete the file +/// `example-readme.md` in the current directory. +use std::path::Path; + +use kxio::fs::FileHandle; + +// #[tokio::main] +pub async fn main() -> kxio::Result<()> { + // Create a `Net` object for making real network requests. + let net: kxio::net::Net = kxio::net::new(); + + // Create a `FileSystem` object for accessing files within the current directory. + // The object created will return a `PathTraveral` error result if there is an attempt to\ + // access a file outside of this directory. + let current_dir = std::env::current_dir().map_err(kxio::fs::Error::Io)?; + let fs: kxio::fs::FileSystem = kxio::fs::new(current_dir); + + // The URL we will fetch - the readme for this library. + let url = "https://git.kemitix.net/kemitix/kxio/raw/branch/main/README.md"; + + // Create a PathBuf to a file within the directory that the `fs` object has access to. + let file_path = fs.base().join("example-readme.md"); + + // Create a generic handle for the file. This doesn't open the file, and always succeeds. + let path = fs.path(&file_path); + + // Other options are; + // `fs.file(&file_path)` - for a file + // `fs.dir(&dir_path)` - for a directory + + // Checks if the path exists (whether a file, directory, etc) + if path.exists()? { + eprintln!("The file {path} already exists. Aborting!"); + return Ok(()); + } + + // Passes a reference to the `fs` and `net` objects for use by your program. + // Your programs should not know whether they are handling a mock or the real thing. + // Any file or network access should be made using these handlers to be properly testable. + let file = download_and_save_to_file(url, &file_path, &fs, &net).await?; + read_file(&file)?; + delete_file(file)?; + + Ok(()) +} + +/// An function that uses a `FileSystem` and a `Net` object to interact with the outside world. +async fn download_and_save_to_file( + url: &str, + file_path: &Path, + // The filesystem abstraction + fs: &kxio::fs::FileSystem, + // The network abstraction + net: &kxio::net::Net, +) -> kxio::Result { + println!("fetching: {url}"); + + // Makes a GET request that can be mocked in a test + let response = net.get(url).header("key", "value").send().await?; + + // As you can see, we use [reqwest] under the hood. + // + // If you need to create a more complex request than the [kxio] fluent API allows, you + // can create a request using [reqwest] and pass it to [net.send(request)]. + + let body = response.text().await?; + println!("fetched {} bytes", body.bytes().len()); + + // Uses the file system abstraction to create a handle for a file. + let file: kxio::fs::PathReal = fs.file(file_path); + println!("writing file: {file}"); + // Writes the body to the file. + file.write(body)?; + + Ok(file) +} + +/// A function that reads the file contents +fn read_file(file: &FileHandle) -> kxio::Result<()> { + println!("reading file: {file}"); + + // Creates a `Reader` which loaded the file into memory. + let reader: kxio::fs::Reader = file.reader()?; + let contents: &str = reader.as_str()?; + println!("{contents}"); + + Ok(()) +} + +/// A function that deletes the file +fn delete_file(file: FileHandle) -> kxio::Result<()> { + println!("deleting file: {file}"); + + file.remove()?; + + Ok(()) +} diff --git a/src/main.rs b/src/main.rs index f39eee9..341c44b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,7 +1,13 @@ +// +mod kxio; mod tls; -fn main() { + +fn main() -> Result<(), Box> { println!("Hello, world!"); tls::main(); + + let rt = tokio::runtime::Runtime::new()?; + Ok(rt.block_on(crate::kxio::main())?) } #[cfg(test)] From 2a9c2cef76a0dd8d736378e512d8034e21892745 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 Jan 2025 08:25:16 +0000 Subject: [PATCH 101/106] fix: add cargo components to toolchain stable-x86_64-unknown-linux-musl --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 126dadf..e301952 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,7 +18,7 @@ RUN cargo binstall -y \ # should be a no-op if the FROM line is up-to-date RUN rustup update stable -RUN rustup component add rustfmt clippy +RUN rustup component add --toolchain stable-x86_64-unknown-linux-musl rustfmt clippy # install nightly RUN rustup install nightly && rustup component add --toolchain nightly rustfmt clippy From 05d4233d3f83337406f89eff238a2544456a2ef5 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Thu, 16 Jan 2025 08:25:16 +0000 Subject: [PATCH 102/106] build: add fmt recipe to justfile --- justfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/justfile b/justfile index b5f2749..223b3a8 100644 --- a/justfile +++ b/justfile @@ -12,5 +12,8 @@ clippy: build run: build docker run --rm -v $PWD:/app/ {{ image }} cargo run +fmt: build + docker run --rm -v $PWD:/app/ {{ image }} cargo fmt + shell: build docker run --rm -it -v $PWD:/app/ {{ image }} bash From 26c46227e665358328eeafbee01b7bc3e68cde4c Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Tue, 14 Jan 2025 20:59:32 +0000 Subject: [PATCH 103/106] feat: push-next uses 'latest' image --- .forgejo/workflows/push-next.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 4a57795..3de00fb 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -7,7 +7,7 @@ jobs: runs-on: docker container: image: - git.kemitix.net/kemitix/rust:v3.1.0 + git.kemitix.net/kemitix/rust:latest strategy: matrix: toolchain: From 3f87d011e73e92b48db0f0fe7bfecc33c67c3fda Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 18 Jan 2025 20:19:49 +0000 Subject: [PATCH 104/106] feat: add dbus-dev to image --- Dockerfile | 1 + README.md | 26 +++++++++++++++++++++++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e301952..f638a27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,6 +39,7 @@ RUN apk add --no-cache \ libssl3 \ openssl-dev \ perl \ + dbus-dev \ git # clang \ diff --git a/README.md b/README.md index 6a73835..cf908c1 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,7 @@ The available toolchain in the image are: - cargo-chef - cargo-hack - release-plz +- dbus-dev - perl ### Scripts @@ -61,10 +62,33 @@ steps: ## Caveats -### native-tls +### openssl + +The alpine linux install doesn't build with this dependency. You can either compile `native-tls` with the `vendored` feature, or not use `openssl`. + +#### vendoered native-tls This crate *must* use the `vendored` feature in order to compile in the Alpine Linux image. ```toml native-tls = { version = "0.2", features = ["vendored"] } ``` + +#### Don't use `openssl` + +Check that none of your dependencies require `openssl`: + +```bash +cargo tree --edges normal -i openssl +``` + +This will list the tree of dependencies that are bringing in `openssl`. + +If you do need ssl/tls, try using `rustls`. e.g. + +```toml +reqwest = { version = "0.12", default-features = false, features = [ + "json", + "rustls-tls", +] } +``` From db523065e02d00d16d800e41b36f0b5279c2da39 Mon Sep 17 00:00:00 2001 From: Paul Campbell Date: Sat, 18 Jan 2025 20:52:20 +0000 Subject: [PATCH 105/106] feat: remove openssl transitive dependency --- Cargo.toml | 3 +-- justfile | 2 +- src/main.rs | 2 -- src/tls.rs | 15 --------------- 4 files changed, 2 insertions(+), 20 deletions(-) delete mode 100644 src/tls.rs diff --git a/Cargo.toml b/Cargo.toml index 41fa947..4b31261 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,6 +4,5 @@ version = "0.1.0" edition = "2021" [dependencies] -kxio = "5.0" -native-tls = { version = "0.2", features = ["vendored"] } +kxio = "5.1" tokio = { version = "1.43", features = ["full"] } diff --git a/justfile b/justfile index 223b3a8..60bdbb1 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,4 @@ -image := "git.kemitix.get/kemitix/rust:test" +image := "git.kemitix.net/kemitix/rust:test" build: docker build . -t {{ image }} diff --git a/src/main.rs b/src/main.rs index 341c44b..93488b4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,10 +1,8 @@ // mod kxio; -mod tls; fn main() -> Result<(), Box> { println!("Hello, world!"); - tls::main(); let rt = tokio::runtime::Runtime::new()?; Ok(rt.block_on(crate::kxio::main())?) diff --git a/src/tls.rs b/src/tls.rs deleted file mode 100644 index f4cb49c..0000000 --- a/src/tls.rs +++ /dev/null @@ -1,15 +0,0 @@ -use native_tls::TlsConnector; -use std::io::{Read, Write}; -use std::net::TcpStream; - -pub fn main() { - let connector = TlsConnector::new().unwrap(); - - let stream = TcpStream::connect("google.com:443").unwrap(); - let mut stream = connector.connect("google.com", stream).unwrap(); - - stream.write_all(b"GET / HTTP/1.0\r\n\r\n").unwrap(); - let mut res = vec![]; - stream.read_to_end(&mut res).unwrap(); - println!("{}", String::from_utf8_lossy(&res)); -} From e06202941f4f089d02b7dc5850f1106dba6819bd Mon Sep 17 00:00:00 2001 From: silvana Date: Mon, 20 Jan 2025 08:14:40 +0100 Subject: [PATCH 106/106] fix(rename): modify to use my forgejo instance. --- .forgejo/workflows/build-image.yml | 44 +++++++++++++++++++++--------- .forgejo/workflows/push-next.yml | 3 +- Dockerfile | 6 ++-- justfile | 2 +- 4 files changed, 36 insertions(+), 19 deletions(-) diff --git a/.forgejo/workflows/build-image.yml b/.forgejo/workflows/build-image.yml index d5c200e..3794bd8 100644 --- a/.forgejo/workflows/build-image.yml +++ b/.forgejo/workflows/build-image.yml @@ -5,22 +5,40 @@ on: jobs: build: - runs-on: ubuntu-latest + runs-on: docker + container: + image: ubuntu:latest steps: - - name: Checkout - uses: actions/checkout@v4 + - name: Checkout + uses: actions/checkout@v4 - - name: Clear image from cache - run: | - docker images git.kemitix.net/${{ env.GITHUB_REPOSITORY }} -q | sort -u | xargs -r docker rmi --force - docker system prune --force --all + - name: login to docker registry + uses: docker/login-action@v3 + with: + registry: git.ragarock.moe + username: silvana + password: ${{ secrets.REGISTRY_TOKEN }} - - name: Build - run: docker build . -t git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest + - name: setup buildx + uses: docker/setup-buildx-action@v3 - - name: Login - run: docker login git.kemitix.net --username kemitix --password ${{ secrets.FORGEJO_TOKEN_WRITE_PACKAGE }} + - name: build and push + uses: docker/build-push-action@v6 + with: + push: true + tags: git.ragarock.moe/${{ env.GITHUB_REPOSITORY }}:latest - - name: Publish - run: docker push git.kemitix.net/${{ env.GITHUB_REPOSITORY }}:latest + # - name: Clear image from cache + # run: | + # docker images git.ragarock.moe/${{ env.GITHUB_REPOSITORY }} -q | sort -u | xargs -r docker rmi --force + # docker system prune --force --all + + # - name: Build + # run: docker build . -t git.ragarock.moe/${{ env.GITHUB_REPOSITORY }}:latest + + # - name: Login + # run: docker login git.ragarock.moe --username silvana --password ${{ secrets.FORGEJO_TOKEN_WRITE_PACKAGE }} + + # - name: Publish + # run: docker push git.ragarock.moe/${{ env.GITHUB_REPOSITORY }}:latest diff --git a/.forgejo/workflows/push-next.yml b/.forgejo/workflows/push-next.yml index 3de00fb..8aca99b 100644 --- a/.forgejo/workflows/push-next.yml +++ b/.forgejo/workflows/push-next.yml @@ -6,8 +6,7 @@ jobs: test: runs-on: docker container: - image: - git.kemitix.net/kemitix/rust:latest + image: git.ragarock.moe/silvana/rust:latest strategy: matrix: toolchain: diff --git a/Dockerfile b/Dockerfile index f638a27..15fbcaf 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,6 @@ FROM docker.io/rust:1.84.0-alpine3.21 -LABEL org.opencontainers.image.source=https://git.kemitix.net/kemitix/rust +LABEL org.opencontainers.image.source=https://git.ragarock.moe/silvana/rust RUN apk add --no-cache curl=8.11.1-r0 RUN curl -L https://github.com/cargo-bins/cargo-binstall/releases/download/v1.10.19/cargo-binstall-x86_64-unknown-linux-musl.tgz -o cargo-binstall.tgz && \ @@ -48,8 +48,8 @@ RUN apk add --no-cache \ # dbus-dev \ -RUN git config --global user.email "action@git.kemitix.net" && \ - git config --global user.name "ForgeJo Action. See: https://git.kemitix.net/kemitix/rust" +RUN git config --global user.email "holo@ragarock.moe" && \ + git config --global user.name "ForgeJo Action. See: https://git.ragarock.moe/silvana/rust" COPY scripts/ /usr/local/bin/ diff --git a/justfile b/justfile index 60bdbb1..373ea93 100644 --- a/justfile +++ b/justfile @@ -1,4 +1,4 @@ -image := "git.kemitix.net/kemitix/rust:test" +image := "git.ragarock.moe/silvana/rust:test" build: docker build . -t {{ image }}