Skip to content

tests: Re-enable collect_and_report_only (compiled) #313

tests: Re-enable collect_and_report_only (compiled)

tests: Re-enable collect_and_report_only (compiled) #313

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
build-linux:
name: Build and test Linux executable
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
arch: [amd64, armv7, aarch64, ppc64le, i386]
steps:
- uses: actions/checkout@v3
- name: Prepare
run: chmod u+x .github/workflows/*.sh
- name: Build for matrix.arch == amd64
if: ${{ matrix.arch == 'amd64' }}
run: |
sudo .github/workflows/generic-build.sh ${{ matrix.arch }}
sudo .github/workflows/ci-run-tests.sh
wget https://codecov.io/bash || true
bash bash -s /tmp/kcov-kcov || true
- name: Build for matrix.arch == i386
if: ${{ matrix.arch == 'i386' }}
run: |
chmod u+x ./.github/workflows/setup-i386.sh
sudo .github/workflows/setup-i386.sh
sudo schroot -c mychroot -- ./.github/workflows/generic-build.sh ${{ matrix.arch }}
- name: Build for matrix.arch == armv7, aarch64, ppc64le
if: ${{ matrix.arch == 'armv7' || matrix.arch == 'aarch64' || matrix.arch == 'ppc64le' }}
uses: uraimo/run-on-arch-action@v2
with:
arch: ${{ matrix.arch }}
distro: ubuntu22.04
run: |
.github/workflows/generic-build.sh ${{ matrix.arch }}
build-osx:
name: Build OSX executable (macos-latest)
runs-on: macos-latest
env:
CC: clang
CXX: clang++
steps:
- uses: actions/checkout@v3
- name: Prepare
run: |
chmod u+x .github/workflows/osx-build.sh .github/workflows/ci-run-tests.sh
brew install zlib bash cmake pkgconfig [email protected] [email protected] dwarfutils
- name: Build for OSX
run: |
sudo .github/workflows/osx-build.sh
sudo .github/workflows/ci-run-tests.sh
build-freebsd:
runs-on: ubuntu-22.04
name: Build and test FreeBSD executable
steps:
- uses: actions/checkout@v3
- name: FreeBSD
id: test
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: pkg install -y binutils cmake elfutils python bash git python2
run: |
chmod u+x .github/workflows/freebsd-build.sh .github/workflows/ci-run-tests.sh
.github/workflows/freebsd-build.sh x86_64
.github/workflows/ci-run-tests.sh
build-and-push-docker-image:
needs: [build-linux, build-osx, build-freebsd]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Docker Hub login
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: echo $DOCKER_PASSWORD | docker login --username $DOCKER_USERNAME --password-stdin
- name: Build docker image
run: docker build -t kcov/kcov:latest .
- name: Push to Docker Hub
run: docker push kcov/kcov:latest