| ... | ... | @@ -1,5 +1,38 @@ |
| 1 | 1 | name: ci |
| 2 | 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 | 36 | pull_request: |
| 4 | 37 | push: |
| 5 | 38 | branches: |
| ... | ... | @@ -10,52 +43,76 @@ concurrency: |
| 10 | 43 | cancel-in-progress: true |
| 11 | 44 | jobs: |
| 12 | 45 | x86_64-linux-debug: |
| 46 | if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-linux-debug"] }} |
| 13 | 47 | runs-on: [self-hosted, Linux, x86_64] |
| 14 | 48 | steps: |
| 15 | 49 | - name: Checkout |
| 16 | 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 | 54 | - name: Build and Test |
| 18 | 55 | run: sh ./ci/linux/build-x86_64-debug.sh |
| 19 | 56 | - name: Print Version |
| 20 | 57 | run: echo "$(build-debug/stage3-debug/bin/zig version)" |
| 21 | 58 | x86_64-linux-release: |
| 59 | if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-linux-release"] }} |
| 22 | 60 | runs-on: [self-hosted, Linux, x86_64] |
| 23 | 61 | steps: |
| 24 | 62 | - name: Checkout |
| 25 | 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 | 67 | - name: Build and Test |
| 27 | 68 | run: sh ./ci/linux/build-x86_64-release.sh |
| 28 | 69 | x86_64-macos: |
| 70 | if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-macos"] }} |
| 29 | 71 | runs-on: "macos-11" |
| 30 | 72 | env: |
| 31 | 73 | ARCH: "x86_64" |
| 32 | 74 | steps: |
| 33 | 75 | - name: Checkout |
| 34 | 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 | 80 | - name: Build and Test |
| 36 | 81 | run: ./ci/macos/build-x86_64.sh |
| 37 | 82 | x86_64-windows: |
| 83 | if: ${{ github.event_name != 'workflow_dispatch' || inputs["x86_64-windows"] }} |
| 38 | 84 | runs-on: windows-latest |
| 39 | 85 | env: |
| 40 | 86 | ARCH: "x86_64" |
| 41 | 87 | steps: |
| 42 | 88 | - name: Checkout |
| 43 | 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 | 93 | - name: Build and Test |
| 45 | 94 | run: ./ci/windows/build.ps1 |
| 46 | 95 | aarch64-linux: |
| 96 | if: ${{ github.event_name != 'workflow_dispatch' || inputs["aarch64-linux"] }} |
| 47 | 97 | runs-on: [self-hosted, Linux, aarch64] |
| 48 | 98 | steps: |
| 49 | 99 | - name: Checkout |
| 50 | 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 | 104 | - name: Build and Test |
| 52 | 105 | run: sh ./ci/linux/build-aarch64.sh |
| 53 | 106 | aarch64-macos: |
| 107 | if: ${{ github.event_name != 'workflow_dispatch' || inputs["aarch64-macos"] }} |
| 54 | 108 | runs-on: [self-hosted, macOS, aarch64] |
| 55 | 109 | env: |
| 56 | 110 | ARCH: "aarch64" |
| 57 | 111 | steps: |
| 58 | 112 | - name: Checkout |
| 59 | 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 | 117 | - name: Build and Test |
| 61 | 118 | run: ./ci/macos/build-aarch64.sh |