authorgravatar for kappaloris@gmail.comLoris Cro <kappaloris@gmail.com> 2022-11-25 19:57:36+01:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-01-09 14:41:57-07:00
log7a70b22cfb5ecdc37ad1096d9097cef5028d7861
treefcbc40246080bf2eb503b8e8d4f58d23fb28bc12
parente6d0edc888d2ea879ae24db8712ece2a519f41f9

ci: introduce support for manual runs on specific commit & targets


1 files changed, 57 insertions(+), 0 deletions(-)

.github/workflows/ci.yaml+57
......@@ -1,5 +1,38 @@
11name: ci
22on:
3 workflow_dispatch:
4 # Allows launching a CI run on an arbitrary commit
5 # and also specify only a subset of the targets to test
6 inputs:
7 commit:
8 description: "master branch commit to build"
9 required: true
10 default: 'HEAD'
11 type: string
12 x86_64-linux-debug:
13 required: false
14 default: true
15 type: boolean
16 x86_64-linux-release:
17 required: false
18 default: true
19 type: boolean
20 x86_64-macos:
21 required: false
22 default: true
23 type: boolean
24 x86_64-windows:
25 required: false
26 default: true
27 type: boolean
28 aarch64-linux:
29 required: false
30 default: true
31 type: boolean
32 aarch64-macos:
33 required: false
34 default: true
35 type: boolean
336 pull_request:
437 push:
538 branches:
......@@ -10,52 +43,76 @@ concurrency:
1043 cancel-in-progress: true
1144jobs:
1245 x86_64-linux-debug:
46 if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-linux-debug"] }}
1347 runs-on: [self-hosted, Linux, x86_64]
1448 steps:
1549 - name: Checkout
1650 uses: actions/checkout@v3
51 - name: Switch to specific commit
52 if: ${{ github.event_name == 'workflow_dispatch' }}
53 run: git checkout ${{ inputs.commit }}
1754 - name: Build and Test
1855 run: sh ./ci/linux/build-x86_64-debug.sh
1956 - name: Print Version
2057 run: echo "$(build-debug/stage3-debug/bin/zig version)"
2158 x86_64-linux-release:
59 if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-linux-release"] }}
2260 runs-on: [self-hosted, Linux, x86_64]
2361 steps:
2462 - name: Checkout
2563 uses: actions/checkout@v3
64 - name: Switch to specific commit
65 if: ${{ github.event_name == 'workflow_dispatch' }}
66 run: git checkout ${{ inputs.commit }}
2667 - name: Build and Test
2768 run: sh ./ci/linux/build-x86_64-release.sh
2869 x86_64-macos:
70 if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-macos"] }}
2971 runs-on: "macos-11"
3072 env:
3173 ARCH: "x86_64"
3274 steps:
3375 - name: Checkout
3476 uses: actions/checkout@v3
77 - name: Switch to specific commit
78 if: ${{ github.event_name == 'workflow_dispatch' }}
79 run: git checkout ${{ inputs.commit }}
3580 - name: Build and Test
3681 run: ./ci/macos/build-x86_64.sh
3782 x86_64-windows:
83 if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-windows"] }}
3884 runs-on: windows-latest
3985 env:
4086 ARCH: "x86_64"
4187 steps:
4288 - name: Checkout
4389 uses: actions/checkout@v3
90 - name: Switch to specific commit
91 if: ${{ github.event_name == 'workflow_dispatch' }}
92 run: git checkout ${{ inputs.commit }}
4493 - name: Build and Test
4594 run: ./ci/windows/build.ps1
4695 aarch64-linux:
96 if: ${{ github.event_name != 'workflow_dispatch' || inputs["aarch64-linux"] }}
4797 runs-on: [self-hosted, Linux, aarch64]
4898 steps:
4999 - name: Checkout
50100 uses: actions/checkout@v3
101 - name: Switch to specific commit
102 if: ${{ github.event_name == 'workflow_dispatch' }}
103 run: git checkout ${{ inputs.commit }}
51104 - name: Build and Test
52105 run: sh ./ci/linux/build-aarch64.sh
53106 aarch64-macos:
107 if: ${{ github.event_name != 'workflow_dispatch' || inputs["aarch64-macos"] }}
54108 runs-on: [self-hosted, macOS, aarch64]
55109 env:
56110 ARCH: "aarch64"
57111 steps:
58112 - name: Checkout
59113 uses: actions/checkout@v3
114 - name: Switch to specific commit
115 if: ${{ github.event_name == 'workflow_dispatch' }}
116 run: git checkout ${{ inputs.commit }}
60117 - name: Build and Test
61118 run: ./ci/macos/build-aarch64.sh