diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index c3749c5..a8c62fd 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -5,12 +5,15 @@ inputs: targets: description: A comma-separated list of Rust targets. default: x86_64-unknown-linux-gnu,aarch64-unknown-linux-gnu,x86_64-pc-windows-gnu + required: true lint: description: A boolean indicating if linting (cargo-fmt, clippy) should be run default: true + required: true test: description: A boolean indicating if tests should be run default: true + required: true runs: using: composite diff --git a/.github/actions/dependencies/action.yml b/.github/actions/dependencies/action.yml index 17635f9..b155e3e 100644 --- a/.github/actions/dependencies/action.yml +++ b/.github/actions/dependencies/action.yml @@ -1,38 +1,18 @@ -name: Install cargo-zigbuild -description: Installs cargo-zigbuild and its dependencies +name: Install dependencies +description: Installs Zig and cargo-zigbuild inputs: zig-version: description: Version of Zig to install - default: 0.14.1 runs: using: composite steps: - name: Install Zig - shell: bash - # the `--transform` options are used to install Zig in the /usr/local/: - # */zig -> /usr/local/bin/zig - # */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} + uses: mlugg/setup-zig@v2 + with: + version: ${{ inputs.zig-version }} - name: Install cargo-zigbuild shell: sh