mirror of
https://github.com/shiroyashik/sculptor.git
synced 2025-12-06 04:51:13 +03:00
use mlugg/setup-zig action to install Zig instead of doing it manually
This commit is contained in:
parent
63b2ca88c7
commit
badd43320d
2 changed files with 8 additions and 25 deletions
3
.github/actions/build/action.yml
vendored
3
.github/actions/build/action.yml
vendored
|
|
@ -5,12 +5,15 @@ inputs:
|
||||||
targets:
|
targets:
|
||||||
description: A comma-separated list of Rust targets.
|
description: A comma-separated list of Rust targets.
|
||||||
default: x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu,x86_64-pc-windows-gnu
|
default: x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu,x86_64-pc-windows-gnu
|
||||||
|
required: true
|
||||||
lint:
|
lint:
|
||||||
description: A boolean indicating if linting (cargo-fmt, clippy) should be run
|
description: A boolean indicating if linting (cargo-fmt, clippy) should be run
|
||||||
default: true
|
default: true
|
||||||
|
required: true
|
||||||
test:
|
test:
|
||||||
description: A boolean indicating if tests should be run
|
description: A boolean indicating if tests should be run
|
||||||
default: true
|
default: true
|
||||||
|
required: true
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
|
|
|
||||||
30
.github/actions/dependencies/action.yml
vendored
30
.github/actions/dependencies/action.yml
vendored
|
|
@ -1,38 +1,18 @@
|
||||||
name: Install cargo-zigbuild
|
name: Install dependencies
|
||||||
description: Installs cargo-zigbuild and its dependencies
|
description: Installs Zig and cargo-zigbuild
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
zig-version:
|
zig-version:
|
||||||
description: Version of Zig to install
|
description: Version of Zig to install
|
||||||
default: 0.14.1
|
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Install Zig
|
- name: Install Zig
|
||||||
shell: bash
|
uses: mlugg/setup-zig@v2
|
||||||
# the `--transform` options are used to install Zig in the /usr/local/:
|
with:
|
||||||
# */zig -> /usr/local/bin/zig
|
version: ${{ inputs.zig-version }}
|
||||||
# */lib/ -> /usr/local/lib/zig/
|
|
||||||
# the rest is not really necessary, but for consistency:
|
|
||||||
# */doc/ -> /usr/local/share/doc/zig/
|
|
||||||
# */LICENSE -> /usr/local/share/doc/zig/copyright
|
|
||||||
# */README.md -> /usr/local/share/doc/zig/README.md
|
|
||||||
run: |
|
|
||||||
ZIG_VERSION="${{ inputs.zig-version }}"
|
|
||||||
[ "$RUNNER_ARCH" == "X64" ] && ZIG_ARCH="x86_64" || ZIG_ARCH="aarch64"
|
|
||||||
wget -q "https://ziglang.org/download/${ZIG_VERSION}/zig-${ZIG_ARCH}-linux-${ZIG_VERSION}.tar.xz" \
|
|
||||||
-O /tmp/zig.tar.xz
|
|
||||||
|
|
||||||
sudo tar -xJf /tmp/zig.tar.xz -C / \
|
|
||||||
--transform='s|^[^/]+/zig$|usr/local/bin/zig|x' \
|
|
||||||
--transform='s|^[^/]+/lib|usr/local/lib/zig|x' \
|
|
||||||
--transform='s|^[^/]+/doc|usr/local/share/doc/zig|x' \
|
|
||||||
--transform='s|^[^/]+/LICENSE$|usr/local/share/doc/zig/copyright|x' \
|
|
||||||
--transform='s|^[^/]+/README.md$|usr/local/share/doc/zig/README.md|x' \
|
|
||||||
--wildcards \
|
|
||||||
"*/"{zig,lib,doc,LICENSE,README.md}
|
|
||||||
|
|
||||||
- name: Install cargo-zigbuild
|
- name: Install cargo-zigbuild
|
||||||
shell: sh
|
shell: sh
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue