Skip to content

turn dry-run off and only clean firestarr-cpp/firestarr #181

turn dry-run off and only clean firestarr-cpp/firestarr

turn dry-run off and only clean firestarr-cpp/firestarr #181

Workflow file for this run

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:
- uses: actions/checkout@v4
- name: Download FireSTARR release
run: |
VERSION="${{ github.ref_name }}"
echo "Downloading FireSTARR $VERSION"
mkdir -p docker-context
curl -L -o firestarr.tar.gz \
"https://github.com/CWFMF/firestarr-cpp/releases/download/${VERSION}/firestarr-ubuntu-x64-gcc-Release.tar.gz"
cd docker-context
tar -xzf ../firestarr.tar.gz
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/Dockerfile.from_binary
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-24.04-arm
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v4
- name: Download FireSTARR release
run: |
VERSION="${{ github.ref_name }}"
echo "Downloading FireSTARR ARM64 $VERSION"
mkdir -p docker-context
curl -L -o firestarr.tar.gz \
"https://github.com/CWFMF/firestarr-cpp/releases/download/${VERSION}/firestarr-ubuntu-arm64-gcc-Release.tar.gz"
cd docker-context
tar -xzf ../firestarr.tar.gz
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/Dockerfile.from_binary
push: true
platforms: linux/arm64
tags: |
ghcr.io/cwfmf/firestarr-cpp/firestarr:${{ github.ref_name }}-arm64
cleanup-docker:
needs: [build-docker-amd64, build-docker-arm64]
runs-on: ubuntu-24.04
permissions:
contents: read
packages: write
steps:
- uses: dataaxiom/ghcr-cleanup-action@v1
with:
# dry-run: true
# FIX: leave firestarr alone for now since it has the history of things from the start
# packages: firestarr,firestarr-cpp/firestarr
packages: firestarr-cpp/firestarr
delete-untagged: true