zig/.github/workflows/ci.yaml

86 lines
2.5 KiB
YAML

name: ci
on: [push, pull_request]
jobs:
x86_64-linux-debug:
outputs:
version: ${{ steps.version.outputs.version }}
runs-on: [self-hosted, Linux, x86_64]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and Test
run: sh ./ci/linux/build-x86_64-debug.sh
# The following step is required by the build-tarballs job.
# If this job is being deleted / commented out, make sure
# to have another job provide this information.
- name: Get Version
id: version
run: echo "version=$(stage3/bin/zig version)" >> $GITHUB_OUTPUT
x86_64-linux-release:
runs-on: [self-hosted, Linux, x86_64]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and Test
run: sh ./ci/linux/build-x86_64-release.sh
x86_64-macos:
runs-on: "macos-11"
env:
ARCH: "x86_64"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and Test
run: ./ci/macos/build-x86_64.sh
x86_64-windows:
runs-on: windows-latest
env:
ARCH: "x86_64"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and Test
run: ./ci/windows/build.ps1
aarch64-linux:
runs-on: [self-hosted, Linux, aarch64]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and Test
run: sh ./ci/linux/build-aarch64.sh
aarch64-macos:
runs-on: [self-hosted, macOS, aarch64]
env:
ARCH: "aarch64"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build and Test
run: ./ci/macos/build-aarch64.sh
build-tarballs:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
needs:
- x86_64-linux-debug
- x86_64-linux-release
- x86_64-macos
- x86_64-windows
- aarch64-linux
- aarch64-macos
env:
ZIG_VERSION: "${{ needs.x86_64-linux-debug.outputs.version }}"
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: webfactory/ssh-agent@v0.6.0
with:
ssh-private-key: ${{ secrets.WEBSITE_CI_PUSH_SSH_KEY }}
- name: Set AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-1
- name: Build Tarballs
run: sh ./ci/linux/build-tarballs.sh