Exporter for machine metrics
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
node_exporter/.github/workflows/bsd.yml

328 lines
10 KiB

name: bsd
on:
push:
branches:
- master
pull_request:
branches:
- master
permissions:
contents: read
env:
GNU_TAR_VERSION: "1.35"
GO_VERSION: "1.26.0"
# To spin up one of the VMs below, see the "Debug Shell" section here: https://github.com/vmactions
jobs:
test_freebsd:
name: Run end-to-end tests on FreeBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: test-e2e
uses: vmactions/freebsd-vm@c9f815bc7aa0d34c9fdd0619b034a32d6ca7b57e # v1.4.2
with:
release: "15.0"
copyback: false
envs: 'GO_VERSION GNU_TAR_VERSION'
usesh: true
prepare: |
pkg update -f
pkg install -y \
bash \
git \
gmake \
gnugrep \
gsed \
gtar \
python \
wget
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOARCH=$(uname -m)
if [ "${GOARCH}" = "x86_64" ] ; then GOARCH="amd64" ; fi
GOGZ="go${GO_VERSION}.freebsd-${GOARCH}.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
gmake test-e2e
echo "::endgroup::"
test_openbsd:
name: Run end-to-end tests on OpenBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: test-e2e
uses: vmactions/openbsd-vm@7fd5a3e251db9d8bdff2f34aae11a43b6be5ad60 # v1.2.4
with:
copyback: false
envs: 'GO_VERSION GNU_TAR_VERSION'
usesh: true
prepare: |
pkg_add -u
pkg_add \
bash \
ggrep \
git \
gmake \
gsed \
gtar-${GNU_TAR_VERSION}p1-static \
python \
wget
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOARCH=$(uname -m)
if [ "${GOARCH}" = "x86_64" ] ; then GOARCH="amd64" ; fi
GOGZ="go${GO_VERSION}.openbsd-${GOARCH}.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
make test-e2e
echo "::endgroup::"
test_netbsd:
name: Run end-to-end tests on NetBSD
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: test-e2e
uses: vmactions/netbsd-vm@e04aec09540429f9cebb0e7941f7cd0c0fc3b44f # v1.3.6
with:
copyback: false
envs: 'GO_VERSION GNU_TAR_VERSION'
usesh: true
prepare: |
/usr/sbin/pkg_add -u \
git \
gmake \
grep \
gsed \
gtar-base-${GNU_TAR_VERSION}\
python312 \
wget
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOARCH=$(uname -m)
if [ "${GOARCH}" = "x86_64" ] ; then GOARCH="amd64" ; fi
GOGZ="go${GO_VERSION}.netbsd-${GOARCH}.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
make test-e2e
echo "::endgroup::"
test_dragonfly:
name: Run end-to-end tests on DragonFly
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: test-e2e
uses: vmactions/dragonflybsd-vm@04601322b25fa8eb14f0394e46e1103084ea0199 # v1.2.6
with:
copyback: false
envs: 'GO_VERSION'
usesh: true
prepare: |
pkg update && pkg upgrade -y
pkg install -y \
bash \
git \
gmake \
gnugrep \
gsed \
gtar \
python3 \
wget
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOARCH=$(uname -m)
if [ "${GOARCH}" = "x86_64" ] ; then GOARCH="amd64" ; fi
GOGZ="go${GO_VERSION}.dragonfly-${GOARCH}.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
ln -s $(which python3) $(pwd)/bin/python
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
gmake test-e2e
echo "::endgroup::"
test_solaris:
name: Run end-to-end tests on Solaris
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: test-e2e
uses: vmactions/solaris-vm@69d382b4a775b25ea5955e6c1730e9d05047ca0d # v1.3.1
with:
copyback: false
envs: 'GO_VERSION'
usesh: true
prepare: |
pkg install \
bash \
curl \
gcc \
git \
gnu-grep \
gnu-make \
gnu-sed \
gnu-tar
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOARCH=$(uname -m)
if [ "${GOARCH}" = "i86pc" ] ; then GOARCH="amd64" ; fi
GOGZ="go${GO_VERSION}.solaris-${GOARCH}.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo ">> building promu as it is not shipped for Solaris"
git clone https://github.com/prometheus/promu.git
cd promu
go build .
cd -
mkdir -p $(go env GOPATH)/bin
ln -s $(pwd)/promu/promu $(go env GOPATH)/bin/promu
export PATH=$(go env GOPATH)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
make test-e2e
echo "::endgroup::"
test_macos:
name: Run end-to-end tests on Darwin/MacOS
runs-on: macos-latest
steps:
- name: Checkout the repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install dependencies
run: |
brew install \
bash \
curl \
git \
grep \
make \
gnu-sed \
gnu-tar \
python3
- name: test-e2e
run: |
echo "::group::Setup prerequisites"
set -eu
mkdir bin
GOARCH=$(uname -m)
if [ "${GOARCH}" = "x86_64" ] ; then GOARCH="amd64" ; fi
GOGZ="go${GO_VERSION}.darwin-${GOARCH}.tar.gz"
wget https://go.dev/dl/${GOGZ}
gtar xzf ${GOGZ}
ln -s $(pwd)/go/bin/go $(pwd)/bin/go
ln -s $(which ggrep) $(pwd)/bin/grep
ln -s $(which gmake) $(pwd)/bin/make
ln -s $(which gsed) $(pwd)/bin/sed
ln -s $(which gtar) $(pwd)/bin/tar
export PATH=$(pwd)/bin:$PATH
echo "::endgroup::"
echo "::group::Print environment information"
uname -a
echo "GOOS: $(go env GOOS)"
echo "GOARCH: $(go env GOARCH)"
echo "::endgroup::"
echo "::group::Run End-to-End Tests"
git config --global --add safe.directory $(pwd)
make test-e2e E2E_EXTRA_FLAGS='--collector.diskstats.device-include=disk[04]'
echo "::endgroup::"