Skip to content

Prometheus metric names cannot contain "." #62

Prometheus metric names cannot contain "."

Prometheus metric names cannot contain "." #62

Workflow file for this run

name: CI
on:
push:
branches: [ "**" ]
tags: [ "v*.*.*" ]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: Build rust ${{ matrix.platform.target }}/${{ matrix.platform.os }}
runs-on: ${{ matrix.platform.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
platform:
# mac target
- { os: 'macos-latest', target: 'x86_64-apple-darwin', arch: 'x86_64', osn: 'mac', cross: true }
- { os: 'macos-latest', target: 'aarch64-apple-darwin', arch: 'aarch64', osn: 'mac', cross: true }
# linux target
- { os: 'ubuntu-latest', target: 'x86_64-unknown-linux-musl', arch: 'x86_64', osn: 'linux', cross: true }
- { os: 'ubuntu-latest', target: 'aarch64-unknown-linux-musl', arch: 'aarch64', osn: 'linux', cross: true }
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
targets: ${{ matrix.platform.target }}
- name: Build binary
uses: clechasseur/rs-cargo@v2
with:
command: build
use-cross: ${{ matrix.platform.cross }}
args: --release --target=${{ matrix.platform.target }} --bin=openmetrics_udpserver
- name: Prepare output artifact for next step
run: |
mkdir -p artifact
mv target/${{ matrix.platform.target }}/release/openmetrics_udpserver artifact/openmetrics_udpserver_${{ matrix.platform.osn }}_${{ matrix.platform.arch }}
- name: Upload output artifact for next step
uses: actions/upload-artifact@v3
with:
name: openmetrics_udpserver_${{ matrix.platform.osn }}_${{ matrix.platform.arch }}
path: artifact/openmetrics_udpserver_${{ matrix.platform.osn }}_${{ matrix.platform.arch }}
release:
runs-on: 'ubuntu-latest'
needs: [ "build" ]
permissions:
contents: write
steps:
- name: Load build artifacts
uses: actions/download-artifact@v3
with:
path: binaries
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
files: |
binaries/*/*