Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/korandoru/setup-zig
Set up your GitHub Actions workflow with a specific version of Zig (https://ziglang.org/).
https://github.com/korandoru/setup-zig
github-actions zig ziglang
Last synced: 3 months ago
JSON representation
Set up your GitHub Actions workflow with a specific version of Zig (https://ziglang.org/).
- Host: GitHub
- URL: https://github.com/korandoru/setup-zig
- Owner: korandoru
- License: apache-2.0
- Created: 2022-09-09T04:20:25.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-01T05:00:31.000Z (3 months ago)
- Last Synced: 2024-10-01T14:55:04.286Z (3 months ago)
- Topics: github-actions, zig, ziglang
- Language: TypeScript
- Homepage:
- Size: 2.84 MB
- Stars: 19
- Watchers: 1
- Forks: 3
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zig - korandoru/setup-zig
README
# Setup Zig
## Archived
Use [mlugg/setup-zig](https://github.com/marketplace/actions/setup-zig-compiler) instead.
## Original
[![CI](https://github.com/korandoru/setup-zig/actions/workflows/ci.yml/badge.svg)](https://github.com/korandoru/setup-zig/actions/workflows/ci.yml)
[![release](https://img.shields.io/github/v/release/korandoru/setup-zig)](https://github.com/korandoru/setup-zig/releases)
[![release date](https://img.shields.io/github/release-date/korandoru/setup-zig)](https://github.com/korandoru/setup-zig/releases)This action provides the following functionality for GitHub Actions users:
* Downloading and caching distribution of the requested Zig version, and adding it to the PATH
## Usage
See [action.yml](action.yml).
**Basic:**
```yml
steps:
- uses: actions/checkout@v3
- uses: korandoru/setup-zig@v1
with:
zig-version: 0.9.1 # released versions or master
- run: zig build test
```The `zig-version` input is required. Options include [all released versions](https://ziglang.org/download/) or "master".
The action will first check the local cache for a semver match. If unable to find a specific version in the cache, the action will attempt to download a version of Zig.
For information regarding locally cached versions of Zig on GitHub-hosted runners, check out [GitHub Actions Runner Images](https://github.com/actions/runner-images).
## Matrix Testing
```yml
jobs:
build:
strategy:
fail-fast: false
matrix:
zig: [ 0.12.0-dev.1710+2bffd8101, 0.11.0, 0.10.0, master ]
os: [ ubuntu-latest, windows-latest, macos-latest ]
runs-on: ${{ matrix.os }}
name: Zig ${{ matrix.zig }} on ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup Zig
uses: korandoru/setup-zig@v1
with:
zig-version: ${{ matrix.zig }}
- run: zig build test
```## License
The scripts and documentation in this project are released under the [Apache License 2.0](LICENSE).