switch to setup-zig for other builds/schedule nightly
AWS-Zig Build / build-zig-amd64-host (push) Successful in 2m34s Details

This commit is contained in:
Emil Lerch 2024-04-29 09:48:24 -07:00
parent dc5f040a2f
commit 007f2f588a
Signed by: lobo
GPG Key ID: A7B62D657EF764F8
2 changed files with 10 additions and 32 deletions

View File

@ -16,28 +16,15 @@ jobs:
# use JS-based actions like actions/checkout@v3...
# container:
# image: alpine:3.15.0
env:
ZIG_VERSION: mach-latest
ARCH: x86_64
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
ref: zig-develop
# ARCH is fine, but we can't substitute directly because zig
# uses x86_64 instead of amd64. They also use aarch64 instead of arm64.
#
# However, arm64/linux isn't quite fully tier 1 yet, so this is more of a
# TODO: https://github.com/ziglang/zig/issues/2443
- name: Install zig
run: |
apt-get update && apt-get install -y jq
file="$(curl -Osw '%{filename_effective}' "$(curl -s https://machengine.org/zig/index.json |jq -r '."'${ZIG_VERSION}'"."x86_64-linux".tarball')")"
tar x -C /usr/local -f "${file}"
ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig
zig version
- name: Run tests
run: zig build test --verbose
- name: Setup Zig
uses: https://git.lerch.org/lobo/setup-zig@v3
with:
version: mach-latest
# Zig package manager expects everything to be inside a directory in the archive,
# which it then strips out on download. So we need to shove everything inside a directory
# the way GitHub/Gitea does for repo archives

View File

@ -1,6 +1,8 @@
name: aws-zig nightly build
run-name: ${{ github.actor }} building AWS Zig SDK
on:
schedule:
- cron: '0 12 30 * *' # 12:30 UTC, 4:30AM Pacific
push:
branches:
- 'zig-develop*'
@ -14,26 +16,15 @@ jobs:
# use JS-based actions like actions/checkout@v3...
# container:
# image: alpine:3.15.0
env:
ZIG_VERSION: master
ARCH: x86_64
steps:
- name: Check out repository code
uses: actions/checkout@v3
with:
ref: zig-develop
# ARCH is fine, but we can't substitute directly because zig
# uses x86_64 instead of amd64. They also use aarch64 instead of arm64.
#
# However, arm64/linux isn't quite fully tier 1 yet, so this is more of a
# TODO: https://github.com/ziglang/zig/issues/2443
- name: Install zig
run: |
apt-get update && apt-get install -y jq
file="$(curl -Osw '%{filename_effective}' "$(curl -s https://ziglang.org/download/index.json |jq -r '."'${ZIG_VERSION}'"."x86_64-linux".tarball')")"
tar x -C /usr/local -f "${file}"
ln -s /usr/local/"${file%%.tar.xz}"/zig /usr/local/bin/zig
zig version
- name: Setup Zig
uses: https://git.lerch.org/lobo/setup-zig@v3
with:
version: master
- name: Run tests
run: zig build test --verbose
# Zig package manager expects everything to be inside a directory in the archive,