|
1 | 1 | name: CPP binary SDK packaging
|
2 | 2 | on:
|
| 3 | + push: |
| 4 | + branches: |
| 5 | + # Run a full packaging step any time a new branch is merged into dev. |
| 6 | + - dev |
3 | 7 | workflow_dispatch:
|
4 | 8 | inputs:
|
5 | 9 | commitIdToPackage:
|
|
15 | 19 | env:
|
16 | 20 | # Packaging prerequisites
|
17 | 21 | # Binutils 2.35.1 released Sep 19, 2020
|
18 |
| - binutilsVer: 2.35.1 |
| 22 | + binutilsVer: "2.35.1" |
19 | 23 | # Demumble 1.1.0 released Nov 13, 2018
|
20 |
| - demumbleVer: 1.1.0 |
| 24 | + demumbleVer: "1.1.0" |
21 | 25 | # Use SHA256 for hashing files.
|
22 |
| - hashCommand: sha256sum |
| 26 | + hashCommand: "sha256sum" |
| 27 | + # Xcode version 11.7 is the version we build the SDK with. |
| 28 | + # Our MacOS runners will use the version in /Applications/Xcode_${xcodeVersion}.app |
| 29 | + xcodeVersion: "11.7" |
23 | 30 |
|
24 | 31 | jobs:
|
25 | 32 | log_inputs:
|
|
40 | 47 | echo "::warning ::Using commit ID '${{ github.event.inputs.commitIdToPackage }}' for building and packaging SDK and tests."
|
41 | 48 | fi
|
42 | 49 | fi
|
43 |
| - if [[ "${{ github.event.inputs.preserveIntermediateArtifacts }}" != "0" ]]; then |
44 |
| - echo "::warning ::Intermediate artifacts will be preserved." |
45 |
| - fi |
| 50 | +
|
| 51 | + - name: log if preserving intermediate artifacts |
| 52 | + if: | |
| 53 | + github.event.inputs.preserveIntermediateArtifacts != 0 && github.event.inputs.preserveIntermediateArtifacts != '' && |
| 54 | + github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' |
| 55 | + run: echo "::warning ::Intermediate artifacts will be preserved." |
46 | 56 |
|
47 | 57 | build_tools:
|
48 | 58 | name: build-tools-${{ matrix.tools_platform }}
|
|
57 | 67 | - os: macos-latest
|
58 | 68 | tools_platform: darwin
|
59 | 69 | steps:
|
| 70 | + - name: setup Xcode version (macos) |
| 71 | + if: runner.os == 'macOS' |
| 72 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer |
| 73 | + |
60 | 74 | - name: fetch and build binutils
|
61 | 75 | run: |
|
62 | 76 | set +e
|
@@ -113,6 +127,10 @@ jobs:
|
113 | 127 | runs-on: macos-latest
|
114 | 128 | if: ${{ github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }}
|
115 | 129 | steps:
|
| 130 | + - name: setup Xcode version (macos) |
| 131 | + if: runner.os == 'macOS' |
| 132 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer |
| 133 | + |
116 | 134 | - name: fetch SDK
|
117 | 135 |
|
118 | 136 | with:
|
@@ -240,6 +258,10 @@ jobs:
|
240 | 258 | build_type: "Debug"
|
241 | 259 |
|
242 | 260 | steps:
|
| 261 | + - name: setup Xcode version (macos) |
| 262 | + if: runner.os == 'macOS' |
| 263 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer |
| 264 | + |
243 | 265 | - uses: actions/checkout@v2
|
244 | 266 | with:
|
245 | 267 | submodules: true
|
@@ -360,6 +382,10 @@ jobs:
|
360 | 382 | - sdk_platform: darwin
|
361 | 383 | runs_on_platform: ubuntu-latest
|
362 | 384 | steps:
|
| 385 | + - name: setup Xcode version (macos) |
| 386 | + if: runner.os == 'macOS' |
| 387 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer |
| 388 | + |
363 | 389 | - name: fetch SDK
|
364 | 390 |
|
365 | 391 | with:
|
@@ -536,7 +562,12 @@ jobs:
|
536 | 562 | name: cleanup-artifacts
|
537 | 563 | runs-on: ubuntu-latest
|
538 | 564 | needs: [merge_packages]
|
539 |
| - if: ${{ github.event.inputs.preserveIntermediateArtifacts == 0 && github.event.inputs.downloadPublicVersion == '' && github.event.inputs.downloadPreviousRun == '' }} |
| 565 | + if: | |
| 566 | + ( |
| 567 | + (github.event.inputs.preserveIntermediateArtifacts == 0 || github.event.inputs.preserveIntermediateArtifacts == '') |
| 568 | + && github.event.inputs.downloadPublicVersion == '' |
| 569 | + && github.event.inputs.downloadPreviousRun == '' |
| 570 | + ) |
540 | 571 | steps:
|
541 | 572 | - uses: geekyeggo/delete-artifact@v1
|
542 | 573 | with:
|
@@ -576,6 +607,10 @@ jobs:
|
576 | 607 | if: always()
|
577 | 608 | runs-on: ubuntu-latest
|
578 | 609 | steps:
|
| 610 | + - name: setup Xcode version (macos) |
| 611 | + if: runner.os == 'macOS' |
| 612 | + run: sudo xcode-select -s /Applications/Xcode_${{ env.xcodeVersion }}.app/Contents/Developer |
| 613 | + |
579 | 614 | - name: download SDK zip
|
580 | 615 | uses: actions/download-artifact@v2
|
581 | 616 | with:
|
|
0 commit comments