| ... | @@ -1,5 +1,38 @@ | ... | @@ -1,5 +1,38 @@ |
| 1 | name: ci | 1 | name: ci |
| 2 | on: | 2 | on: |
| | 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: true | 43 | cancel-in-progress: true |
| 11 | jobs: | 44 | jobs: |
| 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: Checkout | 49 | - name: Checkout |
| 16 | uses: actions/checkout@v3 | 50 | 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 Test | 54 | - name: Build and Test |
| 18 | run: sh ./ci/linux/build-x86_64-debug.sh | 55 | run: sh ./ci/linux/build-x86_64-debug.sh |
| 19 | - name: Print Version | 56 | - 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: Checkout | 62 | - name: Checkout |
| 25 | uses: actions/checkout@v3 | 63 | 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 Test | 67 | - name: Build and Test |
| 27 | run: sh ./ci/linux/build-x86_64-release.sh | 68 | 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: Checkout | 75 | - name: Checkout |
| 34 | uses: actions/checkout@v3 | 76 | 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 Test | 80 | - name: Build and Test |
| 36 | run: ./ci/macos/build-x86_64.sh | 81 | 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-latest | 84 | runs-on: windows-latest |
| 39 | env: | 85 | env: |
| 40 | ARCH: "x86_64" | 86 | ARCH: "x86_64" |
| 41 | steps: | 87 | steps: |
| 42 | - name: Checkout | 88 | - name: Checkout |
| 43 | uses: actions/checkout@v3 | 89 | 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 Test | 93 | - name: Build and Test |
| 45 | run: ./ci/windows/build.ps1 | 94 | 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: Checkout | 99 | - name: Checkout |
| 50 | uses: actions/checkout@v3 | 100 | 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 Test | 104 | - name: Build and Test |
| 52 | run: sh ./ci/linux/build-aarch64.sh | 105 | 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: Checkout | 112 | - name: Checkout |
| 59 | uses: actions/checkout@v3 | 113 | 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 Test | 117 | - name: Build and Test |
| 61 | run: ./ci/macos/build-aarch64.sh | 118 | run: ./ci/macos/build-aarch64.sh |