Merge pull request #344 from P0rc3lain/debug-groups #511
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: Archive | |
| on: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| tests: | |
| uses: ./.github/workflows/tests.yml | |
| binaries: | |
| needs: tests | |
| strategy: | |
| matrix: | |
| include: | |
| - name: "Engine-macOS.framework" | |
| destination: "generic/platform=macOS" | |
| path: "Release" | |
| runs-on: macOS-latest | |
| steps: | |
| - name: Check out sources | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Build the project | |
| run: xcodebuild build | |
| -project Engine.xcodeproj | |
| -scheme Engine archive | |
| -derivedDataPath /tmp/engine-build | |
| -configuration Release | |
| -destination "${{ matrix.destination }}" | |
| - name: Archive the binary | |
| working-directory: "/tmp/engine-build/Build/Products/${{ matrix.path }}" | |
| run: tar -czf "${{ matrix.name }}.tar.gz" Engine.framework | |
| - name: Upload the framework | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "${{ matrix.name }}.tar.gz" | |
| path: "/tmp/engine-build/Build/Products/${{ matrix.path }}/${{ matrix.name }}.tar.gz" | |
| universal-binary: | |
| needs: binaries | |
| runs-on: macOS-latest | |
| steps: | |
| - name: Download macOS binary | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: Engine-macOS.framework.tar.gz | |
| - name: Create dirs | |
| run: mkdir -p macOS | |
| - name: Unarchive the macOS binary | |
| run: tar -xf Engine-macOS.framework.tar.gz -C macOS | |
| - run: xcodebuild -create-xcframework | |
| -framework "/Users/runner/work/Engine/Engine/macOS/Engine.framework" | |
| -output "/Users/runner/work/Engine/Engine/Engine.xcframework" | |
| - name: Upload the universal framework | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Engine.xcframework | |
| path: "Engine.xcframework" | |
| documentation: | |
| needs: tests | |
| runs-on: macOS-latest | |
| steps: | |
| - name: Check Out Sources | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Build the project | |
| run: xcodebuild docbuild | |
| -project Engine.xcodeproj | |
| -scheme Engine archive | |
| -derivedDataPath /tmp/engine-build | |
| -configuration Release | |
| - name: Archive the documentation directory | |
| working-directory: /tmp/engine-build/Build/Products/Release | |
| run: tar -czf Engine.doccarchive.tar.gz Engine.doccarchive | |
| - name: Upload the documentation | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Engine.doccarchive.tar.gz | |
| path: /tmp/engine-build/Build/Products/Release/Engine.doccarchive.tar.gz | |
| deploy: | |
| needs: documentation | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: macOS-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| with: | |
| submodules: true | |
| - name: Setup pages | |
| uses: actions/configure-pages@v2 | |
| - name: Download documentation | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: Engine.doccarchive.tar.gz | |
| - name: Unpack the documentation | |
| run: tar -xf Engine.doccarchive.tar.gz | |
| - name: Prepare documentation for hosting | |
| run: $(xcodebuild -find docc) process-archive | |
| transform-for-static-hosting | |
| ./Engine.doccarchive | |
| --hosting-base-path Engine | |
| --output-path docs | |
| - name: Redirect to the actual documentation | |
| run: cp -f Auxilary/index.html docs/index.html | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: 'docs' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 | |
| ... |