| ... | ... | @@ -1,39 +1,5 @@ |
| 1 | 1 | name: ci |
| 2 | | run-name: ${{ inputs.commit }} |
| 3 | 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 | 3 | pull_request: |
| 38 | 4 | push: |
| 39 | 5 | branches: |
| ... | ... | @@ -44,110 +10,52 @@ concurrency: |
| 44 | 10 | cancel-in-progress: true |
| 45 | 11 | jobs: |
| 46 | 12 | x86_64-linux-debug: |
| 47 | | if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_linux_debug }} |
| 48 | 13 | runs-on: [self-hosted, Linux, x86_64] |
| 49 | 14 | steps: |
| 50 | 15 | - name: Checkout |
| 51 | 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 | 17 | - name: Build and Test |
| 61 | 18 | run: sh ./ci/linux/build-x86_64-debug.sh |
| 62 | 19 | - name: Print Version |
| 63 | 20 | run: echo "$(build-debug/stage3-debug/bin/zig version)" |
| 64 | 21 | x86_64-linux-release: |
| 65 | | if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_linux_release }} |
| 66 | 22 | runs-on: [self-hosted, Linux, x86_64] |
| 67 | 23 | steps: |
| 68 | 24 | - name: Checkout |
| 69 | 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 | 26 | - name: Build and Test |
| 79 | 27 | run: sh ./ci/linux/build-x86_64-release.sh |
| 80 | 28 | x86_64-macos: |
| 81 | | if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_macos }} |
| 82 | 29 | runs-on: "macos-11" |
| 83 | 30 | env: |
| 84 | 31 | ARCH: "x86_64" |
| 85 | 32 | steps: |
| 86 | 33 | - name: Checkout |
| 87 | 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 | 35 | - name: Build and Test |
| 97 | 36 | run: ./ci/macos/build-x86_64.sh |
| 98 | 37 | x86_64-windows: |
| 99 | | if: ${{ github.event_name != 'workflow_dispatch' || inputs.x86_64_windows }} |
| 100 | 38 | runs-on: windows-latest |
| 101 | 39 | env: |
| 102 | 40 | ARCH: "x86_64" |
| 103 | 41 | steps: |
| 104 | 42 | - name: Checkout |
| 105 | 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 | 44 | - name: Build and Test |
| 115 | 45 | run: ./ci/windows/build.ps1 |
| 116 | 46 | aarch64-linux: |
| 117 | | if: ${{ github.event_name != 'workflow_dispatch' || inputs.aarch64_linux }} |
| 118 | 47 | runs-on: [self-hosted, Linux, aarch64] |
| 119 | 48 | steps: |
| 120 | 49 | - name: Checkout |
| 121 | 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 | 51 | - name: Build and Test |
| 135 | 52 | run: sh ./ci/linux/build-aarch64.sh |
| 136 | 53 | aarch64-macos: |
| 137 | | if: ${{ github.event_name != 'workflow_dispatch' || inputs.aarch64_macos }} |
| 138 | 54 | runs-on: [self-hosted, macOS, aarch64] |
| 139 | 55 | env: |
| 140 | 56 | ARCH: "aarch64" |
| 141 | 57 | steps: |
| 142 | 58 | - name: Checkout |
| 143 | 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 | 60 | - name: Build and Test |
| 153 | 61 | run: ./ci/macos/build-aarch64.sh |