diff --git a/.forgejo/actions/build-amd64/Dockerfile b/.forgejo/actions/build-amd64/Dockerfile deleted file mode 100644 index d33c1a7..0000000 --- a/.forgejo/actions/build-amd64/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -FROM docker.io/asonix/rust-builder:latest-linux-amd64 - -RUN rustup component add clippy - -COPY .forgejo/actions/build-amd64/entrypoint.sh /entrypoint.sh - -ENTRYPOINT ["/entrypoint.sh"] diff --git a/.forgejo/actions/build-amd64/action.yaml b/.forgejo/actions/build-amd64/action.yaml deleted file mode 100644 index 8234889..0000000 --- a/.forgejo/actions/build-amd64/action.yaml +++ /dev/null @@ -1,25 +0,0 @@ -name: Build x86_64 Rust Binary -desctiption: Compiles a rust binary with a bespoke rust image -inputs: - name: - description: Name of the binary being compiled - required: true - action: - description: Action to take - required: true - default: build - build_mode: - description: debug or release - required: true - default: debug -outputs: - path: - description: Path to the produced binary -runs: - using: docker - image: Dockerfile -steps: - args: - - ${{ inputs.name }} - - ${{ inputs.action }} - - ${{ inputs.build_mode }} diff --git a/.forgejo/actions/build-amd64/entrypoint.sh b/.forgejo/actions/build-amd64/entrypoint.sh deleted file mode 100755 index c301a35..0000000 --- a/.forgejo/actions/build-amd64/entrypoint.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/env bash - -set -e - -name=$1 -action=$2 -build_mode=$3 - -cargo "${action}" "--${build_mode}" "--target=${TARGET}" - -case "$action" in - build) - echo "path=target/${TARGET}/release/${name}" >> "${GITHUB_OUTPUT}" - ;; - check) - ;; - test) - ;; - clippy) - ;; -esac diff --git a/.forgejo/workflows/check.yaml b/.forgejo/workflows/check.yaml index a5b409a..d3d3ee9 100644 --- a/.forgejo/workflows/check.yaml +++ b/.forgejo/workflows/check.yaml @@ -5,17 +5,25 @@ on: - main jobs: - test-action: + zigbuild: runs-on: docker container: image: docker.io/node:20-bookworm steps: + - run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh + curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash + rustup target add x86_64-unknown-linux-musl + rustup target add armv7-unknown-linux-musleabihf + rustup target add aarch64-unknown-linux-musl + rustup component add clippy + cargo binstall cargo-zigbuild - uses: actions/checkout@v4 - - uses: ./.forgejo/actions/build-amd64 - with: - name: pict-rs - action: clippy - build_mode: debug + - run: | + cargo clippy --no-default-features -- -D warnings + cargo zigbuild --target x86_64-unknown-linux-musl + cargo zigbuild --target armv7-unknown-linux-musleabihf + cargo zigbuild --target aarch64-unknown-linux-musl clippy: runs-on: docker