| ... | @@ -1,39 +1,5 @@ | ... | @@ -1,39 +1,5 @@ |
| 1 | name: ci | 1 | name: ci |
| 2 | run-name: ${{ inputs.commit }} | | |
| 3 | on: | 2 | on: |
| 4 | workflow_dispatch: | | |
| 5 | # Allows launching a CI run on an arbitrary commit | | |
| 6 | # and also specify only a subset of the targets to test | | |
| 7 | inputs: | | |
| 8 | commit: | | |
| 9 | description: "master branch commit to build" | | |
| 10 | required: true | | |
| 11 | default: 'HEAD' | | |
| 12 | type: string | | |
| 13 | x86_64_linux_debug: | | |
| 14 | required: false | | |
| 15 | default: true | | |
| 16 | type: boolean | | |
| 17 | x86_64_linux_release: | | |
| 18 | required: false | | |
| 19 | default: true | | |
| 20 | type: boolean | | |
| 21 | x86_64_macos: | | |
| 22 | required: false | | |
| 23 | default: true | | |
| 24 | type: boolean | | |
| 25 | x86_64_windows: | | |
| 26 | required: false | | |
| 27 | default: true | | |
| 28 | type: boolean | | |
| 29 | aarch64_linux: | | |
| 30 | required: false | | |
| 31 | default: true | | |
| 32 | type: boolean | | |
| 33 | aarch64_macos: | | |
| 34 | required: false | | |
| 35 | default: true | | |
| 36 | type: boolean | | |
| 37 | pull_request: | 3 | pull_request: |
| 38 | push: | 4 | push: |
| 39 | branches: | 5 | branches: |
| ... | @@ -44,110 +10,52 @@ concurrency: | ... | @@ -44,110 +10,52 @@ concurrency: |
| 44 | cancel-in-progress: true | 10 | cancel-in-progress: true |
| 45 | jobs: | 11 | jobs: |
| 46 | x86_64-linux-debug: | 12 | x86_64-linux-debug: |
| 47 | if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_linux_debug }} | | |
| 48 | runs-on: [self-hosted, Linux, x86_64] | 13 | runs-on: [self-hosted, Linux, x86_64] |
| 49 | steps: | 14 | steps: |
| 50 | - name: Checkout | 15 | - name: Checkout |
| 51 | uses: actions/checkout@v3 | 16 | uses: actions/checkout@v3 |
| 52 | - name: Switch to specific commit | | |
| 53 | if: ${{ github.event_name == 'workflow_dispatch' }} | | |
| 54 | run: | | | |
| 55 | rm -rf ../ci | | |
| 56 | cp -r ci ../ | | |
| 57 | git checkout ${{ inputs.commit }} | | |
| 58 | rm -rf ci | | |
| 59 | mv ../ci . | | |
| 60 | - name: Build and Test | 17 | - name: Build and Test |
| 61 | run: sh ./ci/linux/build-x86_64-debug.sh | 18 | run: sh ./ci/linux/build-x86_64-debug.sh |
| 62 | - name: Print Version | 19 | - name: Print Version |
| 63 | run: echo "$(build-debug/stage3-debug/bin/zig version)" | 20 | run: echo "$(build-debug/stage3-debug/bin/zig version)" |
| 64 | x86_64-linux-release: | 21 | x86_64-linux-release: |
| 65 | if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_linux_release }} | | |
| 66 | runs-on: [self-hosted, Linux, x86_64] | 22 | runs-on: [self-hosted, Linux, x86_64] |
| 67 | steps: | 23 | steps: |
| 68 | - name: Checkout | 24 | - name: Checkout |
| 69 | uses: actions/checkout@v3 | 25 | uses: actions/checkout@v3 |
| 70 | - name: Switch to specific commit | | |
| 71 | if: ${{ github.event_name == 'workflow_dispatch' }} | | |
| 72 | run: | | | |
| 73 | rm -rf ../ci | | |
| 74 | cp -r ci ../ | | |
| 75 | git checkout ${{ inputs.commit }} | | |
| 76 | rm -rf ci | | |
| 77 | mv ../ci . | | |
| 78 | - name: Build and Test | 26 | - name: Build and Test |
| 79 | run: sh ./ci/linux/build-x86_64-release.sh | 27 | run: sh ./ci/linux/build-x86_64-release.sh |
| 80 | x86_64-macos: | 28 | x86_64-macos: |
| 81 | if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_macos }} | | |
| 82 | runs-on: "macos-11" | 29 | runs-on: "macos-11" |
| 83 | env: | 30 | env: |
| 84 | ARCH: "x86_64" | 31 | ARCH: "x86_64" |
| 85 | steps: | 32 | steps: |
| 86 | - name: Checkout | 33 | - name: Checkout |
| 87 | uses: actions/checkout@v3 | 34 | uses: actions/checkout@v3 |
| 88 | - name: Switch to specific commit | | |
| 89 | if: ${{ github.event_name == 'workflow_dispatch' }} | | |
| 90 | run: | | | |
| 91 | rm -rf ../ci | | |
| 92 | cp -r ci ../ | | |
| 93 | git checkout ${{ inputs.commit }} | | |
| 94 | rm -rf ci | | |
| 95 | mv ../ci . | | |
| 96 | - name: Build and Test | 35 | - name: Build and Test |
| 97 | run: ./ci/macos/build-x86_64.sh | 36 | run: ./ci/macos/build-x86_64.sh |
| 98 | x86_64-windows: | 37 | x86_64-windows: |
| 99 | if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_windows }} | | |
| 100 | runs-on: windows-latest | 38 | runs-on: windows-latest |
| 101 | env: | 39 | env: |
| 102 | ARCH: "x86_64" | 40 | ARCH: "x86_64" |
| 103 | steps: | 41 | steps: |
| 104 | - name: Checkout | 42 | - name: Checkout |
| 105 | uses: actions/checkout@v3 | 43 | uses: actions/checkout@v3 |
| 106 | - name: Switch to specific commit | | |
| 107 | if: ${{ github.event_name == 'workflow_dispatch' }} | | |
| 108 | run: | | | |
| 109 | if (Test-Path ../ci) { del -r ../ci } | | |
| 110 | cp ci ../ | | |
| 111 | git checkout ${{ inputs.commit }} | | |
| 112 | del -r ci | | |
| 113 | mv ../ci . | | |
| 114 | - name: Build and Test | 44 | - name: Build and Test |
| 115 | run: ./ci/windows/build.ps1 | 45 | run: ./ci/windows/build.ps1 |
| 116 | aarch64-linux: | 46 | aarch64-linux: |
| 117 | if: ${{ github.event_name != 'workflow_dispatch' || inputs.aarch64_linux }} | | |
| 118 | runs-on: [self-hosted, Linux, aarch64] | 47 | runs-on: [self-hosted, Linux, aarch64] |
| 119 | steps: | 48 | steps: |
| 120 | - name: Checkout | 49 | - name: Checkout |
| 121 | uses: actions/checkout@v3 | 50 | uses: actions/checkout@v3 |
| 122 | - name: Switch to specific commit | | |
| 123 | if: ${{ github.event_name == 'workflow_dispatch' }} | | |
| 124 | run: | | | |
| 125 | rm -rf ../ci | | |
| 126 | cp -r ci ../ | | |
| 127 | if ((git rev-parse --is-shallow-repository) -eq "true") { | | |
| 128 | git fetch --unshallow # `git describe` won't work on a shallow repo | | |
| 129 | } | | |
| 130 | git fetch | | |
| 131 | git checkout ${{ inputs.commit }} | | |
| 132 | rm -rf ci | | |
| 133 | mv ../ci . | | |
| 134 | - name: Build and Test | 51 | - name: Build and Test |
| 135 | run: sh ./ci/linux/build-aarch64.sh | 52 | run: sh ./ci/linux/build-aarch64.sh |
| 136 | aarch64-macos: | 53 | aarch64-macos: |
| 137 | if: ${{ github.event_name != 'workflow_dispatch' || inputs.aarch64_macos }} | | |
| 138 | runs-on: [self-hosted, macOS, aarch64] | 54 | runs-on: [self-hosted, macOS, aarch64] |
| 139 | env: | 55 | env: |
| 140 | ARCH: "aarch64" | 56 | ARCH: "aarch64" |
| 141 | steps: | 57 | steps: |
| 142 | - name: Checkout | 58 | - name: Checkout |
| 143 | uses: actions/checkout@v3 | 59 | uses: actions/checkout@v3 |
| 144 | - name: Switch to specific commit | | |
| 145 | if: ${{ github.event_name == 'workflow_dispatch' }} | | |
| 146 | run: | | | |
| 147 | rm -rf ../ci | | |
| 148 | cp -r ci ../ | | |
| 149 | git checkout ${{ inputs.commit }} | | |
| 150 | rm -rf ci | | |
| 151 | mv ../ci . | | |
| 152 | - name: Build and Test | 60 | - name: Build and Test |
| 153 | run: ./ci/macos/build-aarch64.sh | 61 | run: ./ci/macos/build-aarch64.sh |