diff --git a/.gitea/workflows/zig-mach.yaml b/.gitea/workflows/zig-mach.yaml index fde9ce1..9956fc8 100644 --- a/.gitea/workflows/zig-mach.yaml +++ b/.gitea/workflows/zig-mach.yaml @@ -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 diff --git a/.gitea/workflows/zig-nightly.yaml b/.gitea/workflows/zig-nightly.yaml index dbc1a61..d2d771e 100644 --- a/.gitea/workflows/zig-nightly.yaml +++ b/.gitea/workflows/zig-nightly.yaml @@ -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,