Repository navigation
ci: copy latest archives when overwriting a version release #1530
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: build-xros | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [bleeding, master] | |
| tags: ['**', '!latest', '!latest-modular', '!nightly', '!build-state', '!artifacts', '!sha256', '!nightly-staging-*', '!nightly-previous-*'] | |
| paths-ignore: | |
| - '**/*.md' | |
| pull_request: | |
| paths-ignore: | |
| - '**/*.md' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ startsWith(github.ref, 'refs/tags/') && github.run_id || github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ !startsWith(github.ref, 'refs/tags/') }} | |
| permissions: | |
| contents: write | |
| actions: read | |
| env: | |
| # Bump for compiler/SDK setup or build-command changes not declared below. | |
| BUILD_PROFILE_ID: "1" | |
| TARGET: "xros" | |
| NO_FORCE: 1 | |
| GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
| USE_ARTIFACT: true | |
| DISABLE_WORKFLOW: "false" | |
| jobs: | |
| pre-check: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| workflow_disabled: ${{ steps.plan.outputs.workflow_disabled }} | |
| build_needed: ${{ steps.plan.outputs.build_needed }} | |
| matrix: ${{ steps.plan.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| with: | |
| fetch-depth: 0 | |
| - name: Plan selected formula and toolchain builds | |
| id: plan | |
| uses: actions/github-script@v9.0.0 | |
| with: | |
| script: | | |
| await require(`${process.env.GITHUB_WORKSPACE}/scripts/release-build-plan.cjs`).plan({github, context, core, workflow: '.github/workflows/build-xros.yml', job: 'build-xros-platforms'}); | |
| - uses: actions/upload-artifact@v7.0.2 | |
| with: | |
| name: build-plan-${{ github.workflow }} | |
| path: .build-plans/*.pkl | |
| include-hidden-files: true | |
| if-no-files-found: ignore | |
| build-xros-platforms: | |
| if: needs.pre-check.outputs.build_needed == 'true' | |
| runs-on: macos-26 | |
| needs: pre-check | |
| strategy: | |
| matrix: ${{ fromJSON(needs.pre-check.outputs.matrix) }} | |
| env: | |
| TARGET: "xros" | |
| BUNDLE: ${{ matrix.bundle }} | |
| DEVELOPER_DIR: "/Applications/Xcode_26.6.app/Contents/Developer" | |
| steps: | |
| - uses: actions/checkout@v7.0.1 | |
| - name: Determine Release | |
| id: vars | |
| shell: bash | |
| run: | | |
| if [[ "${{ github.ref }}" == refs/tags/* ]]; then | |
| echo "RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref }}" == "refs/heads/master" ]]; then | |
| echo "RELEASE=nightly" >> $GITHUB_ENV | |
| elif [[ "${{ github.ref }}" == "refs/heads/bleeding" ]]; then | |
| echo "RELEASE=latest" >> $GITHUB_ENV | |
| else | |
| echo "RELEASE=latest" >> $GITHUB_ENV | |
| fi | |
| - name: Scripts Calc Formula - ${{ env.TARGET }} Bundle ${{ matrix.bundle }} | |
| run: ./scripts/calculate_formulas.sh | |
| - name: Scripts Install | |
| run: ./scripts/xros/install.sh | |
| - name: Restore compatible platform artifacts | |
| id: platform-artifacts | |
| if: env.USE_ARTIFACT == 'true' | |
| continue-on-error: true | |
| uses: ./.github/actions/platform-artifacts | |
| with: | |
| phase: restore | |
| variant: ${{ matrix.bundle }} | |
| archs: arm64 x86_64 SIM_arm64 | |
| - name: Build VisionOS | |
| working-directory: ${{ env.GITHUB_WORKSPACE }} | |
| run: scripts/build.sh | |
| env: | |
| TARGET: "xros" | |
| BUNDLE: ${{ matrix.bundle }} | |
| ARCH: arm64 | |
| GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
| - name: Build VisionOS | |
| working-directory: ${{ env.GITHUB_WORKSPACE }} | |
| run: scripts/build.sh | |
| env: | |
| TARGET: "xros" | |
| BUNDLE: ${{ matrix.bundle }} | |
| ARCH: x86_64 | |
| GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
| - name: Build VisionOS SIMULATOR arm64 | |
| working-directory: ${{ env.GITHUB_WORKSPACE }} | |
| run: scripts/build.sh | |
| env: | |
| TARGET: "xros" | |
| BUNDLE: ${{ matrix.bundle }} | |
| ARCH: SIM_arm64 | |
| GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
| - name: Publish platform artifact baseline | |
| continue-on-error: true | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') && env.USE_ARTIFACT == 'true' && steps.platform-artifacts.outcome == 'success' | |
| uses: ./.github/actions/platform-artifacts | |
| with: | |
| phase: save | |
| variant: ${{ matrix.bundle }} | |
| archs: arm64 x86_64 SIM_arm64 | |
| - name: List output directory | |
| run: ls -lah out/ | |
| - name: Merge our VisionOS libaries into XC Framework | |
| working-directory: ${{ env.GITHUB_WORKSPACE }} | |
| run: scripts/xros/xcframework_all.sh | |
| env: | |
| BUNDLE: ${{ matrix.bundle }} | |
| GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
| - name: Package XCFramework | |
| if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| working-directory: ${{ env.GITHUB_WORKSPACE }} | |
| run: scripts/package.sh | |
| env: | |
| BUNDLE: ${{ matrix.bundle }} | |
| GA_CI_SECRET: ${{ secrets.CI_SECRET }} | |
| - name: Update Release XCFramework | |
| if: github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master' || github.ref == 'refs/heads/bleeding') | |
| uses: danoli3/action-gh-release@ec40b04e78c39008f73c4ca3fdf9b51df604c4ed # temporary patch: softprops/action-gh-release#852 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| tag_name: ${{ env.RELEASE }} | |
| files: xout/openFrameworksLibs_${{ env.RELEASE }}_${{ env.TARGET }}_${{ matrix.bundle }}.tar.bz2 | |
| - name: Download verified Linux build plan | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/bleeding' || github.ref == 'refs/heads/master') | |
| uses: actions/download-artifact@v8.0.2 | |
| with: | |
| name: build-plan-${{ github.workflow }} | |
| path: ${{ runner.temp }}/build-plans | |
| - name: Record final release outputs | |
| if: github.event_name == 'push' && (github.ref == 'refs/heads/bleeding' || github.ref == 'refs/heads/master') | |
| uses: actions/github-script@v9.0.0 | |
| env: | |
| BUILD_PLAN_MATRIX: ${{ toJSON(matrix) }} | |
| with: | |
| github-token: ${{ secrets.PAT_TOKEN || secrets.GITHUB_TOKEN }} | |
| script: | | |
| await require(`${process.env.GITHUB_WORKSPACE}/scripts/release-build-plan.cjs`).record({github, context, core, workflow: '.github/workflows/build-xros.yml', job: 'build-xros-platforms', matrix: JSON.parse(process.env.BUILD_PLAN_MATRIX)}); |