mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-20 11:21:14 +00:00
Try zigbuild
This commit is contained in:
parent
5414fca339
commit
839b3e0088
4 changed files with 14 additions and 59 deletions
|
@ -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"]
|
|
@ -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 }}
|
|
@ -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
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue