mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
bc90f2ae3c
This is the main way this feature is supposed to work: 1. you discover that a test started failing at some point but a misconfiguration in the CI script didn't catch that causing a bunch of false negative (ie false green) CIs over time 2. you fix the script and now want to figure out when the test started failing 3. you want to rebuild older commits, potentially only on specific targets, but with the new fixed CI script that correctly catches failures This is what this commit enables
149 lines
4.3 KiB
YAML
149 lines
4.3 KiB
YAML
name: ci
|
|
on:
|
|
workflow_dispatch:
|
|
# Allows launching a CI run on an arbitrary commit
|
|
# and also specify only a subset of the targets to test
|
|
inputs:
|
|
commit:
|
|
description: "master branch commit to build"
|
|
required: true
|
|
default: 'HEAD'
|
|
type: string
|
|
x86_64_linux_debug:
|
|
required: false
|
|
default: true
|
|
type: boolean
|
|
x86_64_linux_release:
|
|
required: false
|
|
default: true
|
|
type: boolean
|
|
x86_64_macos:
|
|
required: false
|
|
default: true
|
|
type: boolean
|
|
x86_64_windows:
|
|
required: false
|
|
default: true
|
|
type: boolean
|
|
aarch64_linux:
|
|
required: false
|
|
default: true
|
|
type: boolean
|
|
aarch64_macos:
|
|
required: false
|
|
default: true
|
|
type: boolean
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
concurrency:
|
|
# Cancels pending runs when a PR gets updated.
|
|
group: ${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
jobs:
|
|
x86_64-linux-debug:
|
|
if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_linux_debug }}
|
|
runs-on: [self-hosted, Linux, x86_64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Switch to specific commit
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
run: |
|
|
rf -rf ../ci
|
|
cp -r ci ../
|
|
git checkout ${{ inputs.commit }}
|
|
rm -rf ci
|
|
mv ../ci .
|
|
- name: Build and Test
|
|
run: sh ./ci/linux/build-x86_64-debug.sh
|
|
- name: Print Version
|
|
run: echo "$(build-debug/stage3-debug/bin/zig version)"
|
|
x86_64-linux-release:
|
|
if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_linux_release }}
|
|
runs-on: [self-hosted, Linux, x86_64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Switch to specific commit
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
run: |
|
|
rf -rf ../ci
|
|
cp -r ci ../
|
|
git checkout ${{ inputs.commit }}
|
|
rm -rf ci
|
|
mv ../ci .
|
|
- name: Build and Test
|
|
run: sh ./ci/linux/build-x86_64-release.sh
|
|
x86_64-macos:
|
|
if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_macos }}
|
|
runs-on: "macos-11"
|
|
env:
|
|
ARCH: "x86_64"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Switch to specific commit
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
run: |
|
|
rf -rf ../ci
|
|
cp -r ci ../
|
|
git checkout ${{ inputs.commit }}
|
|
rm -rf ci
|
|
mv ../ci .
|
|
- name: Build and Test
|
|
run: ./ci/macos/build-x86_64.sh
|
|
x86_64-windows:
|
|
if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_windows }}
|
|
runs-on: windows-latest
|
|
env:
|
|
ARCH: "x86_64"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Switch to specific commit
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
run: |
|
|
rf -rf ../ci
|
|
cp -r ci ../
|
|
git checkout ${{ inputs.commit }}
|
|
rm -rf ci
|
|
mv ../ci .
|
|
- name: Build and Test
|
|
run: ./ci/windows/build.ps1
|
|
aarch64-linux:
|
|
if: ${{ github.event_name != 'workflow_dispatch' || inputs.aarch64_linux }}
|
|
runs-on: [self-hosted, Linux, aarch64]
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Switch to specific commit
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
run: |
|
|
rf -rf ../ci
|
|
cp -r ci ../
|
|
git checkout ${{ inputs.commit }}
|
|
rm -rf ci
|
|
mv ../ci .
|
|
- name: Build and Test
|
|
run: sh ./ci/linux/build-aarch64.sh
|
|
aarch64-macos:
|
|
if: ${{ github.event_name != 'workflow_dispatch' || inputs.aarch64_macos }}
|
|
runs-on: [self-hosted, macOS, aarch64]
|
|
env:
|
|
ARCH: "aarch64"
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
- name: Switch to specific commit
|
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
run: |
|
|
rf -rf ../ci
|
|
cp -r ci ../
|
|
git checkout ${{ inputs.commit }}
|
|
rm -rf ci
|
|
mv ../ci .
|
|
- name: Build and Test
|
|
run: ./ci/macos/build-aarch64.sh
|