move build-containers into cmake-test.yml for now #171
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: cmake-test | |
| on: | |
| push: | |
| branches: [ "main", "dev", "unstable" ] | |
| tags: [ "*" ] | |
| pull_request: | |
| branches: [ "main", "dev", "unstable" ] | |
| workflow_dispatch: | |
| inputs: | |
| firestarr_ref: | |
| description: 'FireSTARR branch/tag to build' | |
| default: 'main' | |
| type: string | |
| release: | |
| types: [published] | |
| jobs: | |
| cmake-test-macos: | |
| uses: ./.github/workflows/cmake-test-on.yml | |
| with: | |
| os: ${{ matrix.os }} | |
| os_version: ${{ matrix.os_version }} | |
| compiler: ${{ matrix.compiler }} | |
| triplet: ${{ matrix.target-cpu }}-${{ matrix.target-os }} | |
| target-compiler: ${{ matrix.target-compiler }} | |
| target-cpu: ${{ matrix.target-cpu }} | |
| target-os: ${{ matrix.target-os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos] | |
| os_version: [latest] | |
| compiler: [clang++] | |
| include: | |
| - os: macos | |
| target-cpu: arm64 | |
| target-os: osx | |
| target-compiler: clang | |
| cmake-test-ubuntu: | |
| uses: ./.github/workflows/cmake-test-on.yml | |
| with: | |
| os: ${{ matrix.os }} | |
| os_version: ${{ matrix.os_version }} | |
| compiler: ${{ matrix.compiler }} | |
| triplet: ${{ matrix.target-cpu }}-${{ matrix.target-os }} | |
| target-compiler: ${{ matrix.target-compiler }} | |
| target-cpu: ${{ matrix.target-cpu }} | |
| target-os: ${{ matrix.target-os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu] | |
| os_version: [24.04] | |
| compiler: [clang++, g++] | |
| target-cpu: [arm64, x64] | |
| include: | |
| - os: ubuntu | |
| target-os: linux | |
| - compiler: clang++ | |
| target-compiler: clang | |
| - compiler: g++ | |
| target-compiler: gcc | |
| cmake-test-windows: | |
| uses: ./.github/workflows/cmake-test-on.yml | |
| with: | |
| os: ${{ matrix.os }} | |
| os_version: ${{ matrix.os_version }} | |
| compiler: ${{ matrix.compiler }} | |
| triplet: ${{ matrix.target-cpu }}-${{ matrix.target-os }} | |
| target-compiler: ${{ matrix.target-compiler }} | |
| target-cpu: ${{ matrix.target-cpu }} | |
| target-os: ${{ matrix.target-os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows] | |
| os_version: [latest] | |
| compiler: [cl] | |
| include: | |
| - os: windows | |
| target-compiler: cl | |
| target-cpu: x64 | |
| target-os: windows | |
| cmake-test: | |
| needs: [cmake-test-ubuntu, cmake-test-macos, cmake-test-windows] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: List artifacts | |
| run: | | |
| echo "=== All artifacts ===" | |
| find . -type f \( -name "*.tar.gz" -o -name "*.zip" \) | |
| - name: Update firestarr-latest release | |
| if: github.event_name != 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: firestarr-latest | |
| name: "FireSTARR Latest Build" | |
| body: | | |
| Latest FireSTARR binaries built from last commit | |
| **commit:** ${{ github.ref }} | |
| **Built:** ${{ github.run_id }} | |
| **Workflow run:** https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| prerelease: true | |
| make_latest: false | |
| files: | | |
| ./firestarr*/*.tar.gz | |
| ./firestarr*/*.zip | |
| - name: Attach to release (release events) | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| name: "FireSTARR ${{ github.ref_name }}" | |
| body: | | |
| **Hash:** ${{ github.sha }} | |
| **Workflow run:** https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | |
| prerelease: true | |
| make_latest: false | |
| generate_release_notes: true | |
| files: | | |
| ./firestarr*/*.tar.gz | |
| ./firestarr*/*.zip | |
| - name: Attach to release (release events) | |
| if: github.event_name == 'release' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| ./firestarr*/*.tar.gz | |
| ./firestarr*/*.zip | |
| build-docker-amd64: | |
| needs: [cmake-test] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout Nomad (for Dockerfile) | |
| uses: actions/checkout@v4 | |
| - name: Download FireSTARR release | |
| run: | | |
| VERSION="${{ github.ref_name }}" | |
| echo "Downloading FireSTARR $VERSION" | |
| mkdir -p docker-context | |
| cd docker-context | |
| # Download Linux x64 binary from CWFMF release | |
| curl -L -o firestarr.tar.gz \ | |
| "https://github.com/CWFMF/firestarr-cpp/releases/download/${VERSION}/firestarr-ubuntu-x64-gcc-Release.tar.gz" | |
| tar -xzf firestarr.tar.gz --one-top-level=firestarr/ | |
| chmod +x firestarr | |
| echo "$VERSION" > VERSION | |
| echo "=== Contents ===" | |
| ls -la | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker-context | |
| file: docker/firestarr/Dockerfile | |
| push: true | |
| platforms: linux/amd64 | |
| tags: | | |
| ghcr.io/cwfmf/firestarr-cpp/firestarr:${{ github.ref_name }}-amd64 | |
| ghcr.io/cwfmf/firestarr-cpp/firestarr:${{ github.ref_name }} | |
| ghcr.io/cwfmf/firestarr-cpp/firestarr:latest | |
| build-docker-arm64: | |
| needs: [cmake-test] | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout Nomad (for Dockerfile) | |
| uses: actions/checkout@v4 | |
| - name: Download FireSTARR release | |
| if: steps.check-arm64.outputs.has_arm64 == 'true' | |
| run: | | |
| VERSION="${{ github.ref_name }}" | |
| echo "Downloading FireSTARR ARM64 $VERSION" | |
| mkdir -p docker-context | |
| cd docker-context | |
| curl -L -o firestarr.tar.gz \ | |
| "https://github.com/CWFMF/firestarr-cpp/releases/download/${VERSION}/firestarr-ubuntu-arm64-gcc-Release.tar.gz" | |
| tar -xzf firestarr.tar.gz --one-top-level=firestarr/ | |
| chmod +x firestarr | |
| echo "$VERSION" > VERSION | |
| ls -la | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker-context | |
| file: docker/firestarr/Dockerfile | |
| push: true | |
| platforms: linux/arm64 | |
| tags: | | |
| ghcr.io/cwfmf/firestarr-cpp/firestarr:${{ github.ref_name }}-arm64 |