sequenceDiagram
autonumber
actor alice as Alice
box Github.com
participant gh as Github.com Website
participant ghapi as Github.com API
end
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
curl -sL https://lab.llvm.org/buildbot/api/v2/workers > workers.json | |
curl -sL https://lab.llvm.org/buildbot/api/v2/builders > builders.json | |
cat builders.json | jq '.builders[] | {(.builderid|tostring): .name}' | jq '{"builders": (reduce inputs as $in (.; . + $in))}' > builders_lut.json | |
jq -s '.[0] * .[1]' builders_lut.json workers.json > joined.json | |
cat joined.json | jq '.builders as $builders | .workers[] | {"workername": .name, "admin": (""+.workerinfo.admin|tostring), "builders": $builders[.configured_on[].builderid | tostring]}' | jq -s > temp.json | |
cat temp.json | jq 'group_by(.admin)[] | {"admin": ("" + .[0].admin), "builders": [.[] | .builders] | sort | unique}' | jq -s |
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
FROM fedora:rawhide | |
LABEL description="Test compilers with llvm-test-suite" | |
USER root | |
WORKDIR /root | |
# Install deps to run test-suite | |
RUN dnf install -y \ | |
cmake \ | |
fedora-packager \ |
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
#include <cstdio> | |
#include <cmath> | |
#include <array> | |
static unsigned getNumDisplayWidth(unsigned N) { | |
if (N < 10) | |
return 1; | |
if (N < 100) | |
return 2; | |
if (N < 1000) |
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
cmake_minimum_required(VERSION 3.13.4) | |
project(myapp) | |
add_executable(myapp myapp.cpp) | |
target_link_libraries(myapp) | |
install(TARGETS myapp RUNTIME DESTINATION bin) |
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
%set_build_flags \ | |
CFLAGS="${CFLAGS:-%{build_cflags}}" ; export CFLAGS ; \ | |
CXXFLAGS="${CXXFLAGS:-%{build_cxxflags}}" ; export CXXFLAGS ; \ | |
FFLAGS="${FFLAGS:-%{build_fflags}}" ; export FFLAGS ; \ | |
FCFLAGS="${FCFLAGS:-%{build_fflags}}" ; export FCFLAGS ; \ | |
LDFLAGS="${LDFLAGS:-%{build_ldflags}}" ; export LDFLAGS ; \ | |
LT_SYS_LIBRARY_PATH="${LT_SYS_LIBRARY_PATH:-%_libdir:}" ; export LT_SYS_LIBRARY_PATH ; \ | |
CC="${CC:-%{__cc}}" ; export CC ; \ | |
CXX="${CXX:-%{__cxx}}" ; export CXX \ | |
%{?__llvm_pgo_instrumented_build_flags} |
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
# See https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_macros | |
%global toolchain clang | |
Name: myapp | |
Version: 1.0.0 | |
Release: 1%{?dist} | |
Summary: A simple "Hello, World!" application. | |
License: Apache-2.0 | |
URL: https://github.com/kwk/hello-world |
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
#!/bin/bash | |
# This script is supposed to show the usage of inotifywait when you want process | |
# files in a directory in batches once the files have been created. | |
# | |
# | |
# Test this script with: | |
# | |
# $ this-script.sh | |
# $ for i in a b c ; do echo $i > /tmp/$i.profraw; done \ |
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
#!/bin/bash | |
# This script is supposed to show the usage of inotifywait when you want process | |
# files in a directory in batches once the files have been created. | |
# | |
# | |
# Test this script with: | |
# | |
# $ this-script.sh | |
# $ for i in a b c ; do echo $i > /tmp/$i.profraw; done \ |
I wanted to create a dashboard in grafana about copr builds and needed to feed the build data into a postgres database. From there I can consume it in Grafana using a Postgres Data Source.
In order to have a simple conversion at hand I've written the script copr-json-to-sql.sh
which prints SQL-INSERT
-statements for the build information in a denomalized form.
The schema for the copr_build_logs
table can be found in copr_build_logs.sql
.
For example, you can call the script to get information about the builds of the @kdesig/python-qt6
project which is featured here.