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 @@...@@ -1,5 +1,38 @@
1name: ci1name: ci
2on:2on:
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
3 pull_request:36 pull_request:
4 push:37 push:
5 branches: 38 branches:
...@@ -10,52 +43,76 @@ concurrency:...@@ -10,52 +43,76 @@ concurrency:
10 cancel-in-progress: true43 cancel-in-progress: true
11jobs:44jobs:
12 x86_64-linux-debug:45 x86_64-linux-debug:
46 if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-linux-debug"] }}
13 runs-on: [self-hosted, Linux, x86_64]47 runs-on: [self-hosted, Linux, x86_64]
14 steps:48 steps:
15 - name: Checkout49 - name: Checkout
16 uses: actions/checkout@v350 uses: actions/checkout@v3
51 - name: Switch to specific commit
52 if: ${{ github.event_name == 'workflow_dispatch' }}
53 run: git checkout ${{ inputs.commit }}
17 - name: Build and Test54 - name: Build and Test
18 run: sh ./ci/linux/build-x86_64-debug.sh55 run: sh ./ci/linux/build-x86_64-debug.sh
19 - name: Print Version56 - name: Print Version
20 run: echo "$(build-debug/stage3-debug/bin/zig version)"57 run: echo "$(build-debug/stage3-debug/bin/zig version)"
21 x86_64-linux-release:58 x86_64-linux-release:
59 if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-linux-release"] }}
22 runs-on: [self-hosted, Linux, x86_64]60 runs-on: [self-hosted, Linux, x86_64]
23 steps:61 steps:
24 - name: Checkout62 - name: Checkout
25 uses: actions/checkout@v363 uses: actions/checkout@v3
64 - name: Switch to specific commit
65 if: ${{ github.event_name == 'workflow_dispatch' }}
66 run: git checkout ${{ inputs.commit }}
26 - name: Build and Test67 - name: Build and Test
27 run: sh ./ci/linux/build-x86_64-release.sh68 run: sh ./ci/linux/build-x86_64-release.sh
28 x86_64-macos:69 x86_64-macos:
70 if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-macos"] }}
29 runs-on: "macos-11"71 runs-on: "macos-11"
30 env: 72 env:
31 ARCH: "x86_64"73 ARCH: "x86_64"
32 steps:74 steps:
33 - name: Checkout75 - name: Checkout
34 uses: actions/checkout@v376 uses: actions/checkout@v3
77 - name: Switch to specific commit
78 if: ${{ github.event_name == 'workflow_dispatch' }}
79 run: git checkout ${{ inputs.commit }}
35 - name: Build and Test80 - name: Build and Test
36 run: ./ci/macos/build-x86_64.sh81 run: ./ci/macos/build-x86_64.sh
37 x86_64-windows:82 x86_64-windows:
83 if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-windows"] }}
38 runs-on: windows-latest84 runs-on: windows-latest
39 env: 85 env:
40 ARCH: "x86_64"86 ARCH: "x86_64"
41 steps:87 steps:
42 - name: Checkout88 - name: Checkout
43 uses: actions/checkout@v389 uses: actions/checkout@v3
90 - name: Switch to specific commit
91 if: ${{ github.event_name == 'workflow_dispatch' }}
92 run: git checkout ${{ inputs.commit }}
44 - name: Build and Test93 - name: Build and Test
45 run: ./ci/windows/build.ps194 run: ./ci/windows/build.ps1
46 aarch64-linux:95 aarch64-linux:
96 if: ${{ github.event_name != 'workflow_dispatch' || inputs["aarch64-linux"] }}
47 runs-on: [self-hosted, Linux, aarch64]97 runs-on: [self-hosted, Linux, aarch64]
48 steps:98 steps:
49 - name: Checkout99 - name: Checkout
50 uses: actions/checkout@v3100 uses: actions/checkout@v3
101 - name: Switch to specific commit
102 if: ${{ github.event_name == 'workflow_dispatch' }}
103 run: git checkout ${{ inputs.commit }}
51 - name: Build and Test104 - name: Build and Test
52 run: sh ./ci/linux/build-aarch64.sh105 run: sh ./ci/linux/build-aarch64.sh
53 aarch64-macos:106 aarch64-macos:
107 if: ${{ github.event_name != 'workflow_dispatch' || inputs["aarch64-macos"] }}
54 runs-on: [self-hosted, macOS, aarch64]108 runs-on: [self-hosted, macOS, aarch64]
55 env: 109 env:
56 ARCH: "aarch64"110 ARCH: "aarch64"
57 steps:111 steps:
58 - name: Checkout112 - name: Checkout
59 uses: actions/checkout@v3113 uses: actions/checkout@v3
114 - name: Switch to specific commit
115 if: ${{ github.event_name == 'workflow_dispatch' }}
116 run: git checkout ${{ inputs.commit }}
60 - name: Build and Test117 - name: Build and Test
61 run: ./ci/macos/build-aarch64.sh118 run: ./ci/macos/build-aarch64.sh