Skip to content

Commit

Permalink
Merge pull request #413 from SimonKagstrom/correct-ci-builds
Browse files Browse the repository at this point in the history
Correct ci builds
  • Loading branch information
SimonKagstrom authored Jan 7, 2024
2 parents e969e19 + 895f21d commit 1d036f7
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 41 deletions.
45 changes: 9 additions & 36 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [amd64, armv7, aarch64, ppc64le]
arch: [amd64, armv7, aarch64, ppc64le, i386]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Prepare
run: chmod u+x .github/workflows/*.sh
Expand All @@ -29,26 +29,25 @@ jobs:
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 }}
sudo .github/workflows/ci-run-tests.sh ${{ matrix.arch }}
- name: Build for matrix.arch == armv7, aarch64, ppc64le
if: ${{ matrix.arch == 'armv7' || matrix.arch == 'aarch64' || matrix.arch == 'ppc64le' }}
uses: uraimo/[email protected]
with:
architecture: ${{ matrix.arch }}
distribution: ubuntu22.04
arch: ${{ matrix.arch }}
distro: ubuntu22.04
run: |
.github/workflows/generic-build.sh ${{ matrix.arch }}
build-osx:
name: Build and test OSX executable (macOS-latest)
runs-on: macOS-latest
name: Build OSX executable (macos-latest)
runs-on: macos-latest
env:
CC: clang
CXX: clang++

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Prepare
run: |
Expand All @@ -58,39 +57,13 @@ jobs:
- name: Build for OSX
run: |
sudo .github/workflows/osx-build.sh
sudo .github/workflows/ci-run-tests.sh
build-osx-big-sur:
if: false
name: Build and test OSX executable (Big Sur)
runs-on: macOS-11
env:
CC: clang
CXX: clang++

steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '11.7.0'
- uses: actions/checkout@v2

- 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: macos-12
name: Build and test FreeBSD executable
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: FreeBSD
id: test
uses: vmactions/freebsd-vm@v0
Expand All @@ -108,7 +81,7 @@ jobs:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/generic-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ run () {
fi

chmod u+x .github/workflows/test-executable.sh
kcov --include-path=.github/workflows/test-executable.sh coverage .github/workflows/test-executable.sh
kcov --include-pattern=test-executable.sh coverage .github/workflows/test-executable.sh

local coverage="$(<coverage/test*.sh*/coverage.json)"
local coverage="$(<coverage/test-executable.sh/coverage.json)"
local percent="${coverage##*percent_covered\": \"}"
local total_lines="${coverage##*total_lines\": }"
local covered_lines="${coverage##*covered_lines\": }"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/setup-i386.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ root-groups=root
preserve-environment=true
personality=linux32" >> /etc/schroot/schroot.conf

debootstrap --variant=buildd --arch i386 bionic /chroots/i386 http://archive.ubuntu.com/ubuntu/
debootstrap --variant=buildd --arch i386 focal /chroots/i386 http://archive.ubuntu.com/ubuntu/
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(${SOLIB} dl)
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
find_package (LibElf)
find_package (Elfutils)
find_package (ElfUtils)
set (ELF_SRCS
engines/clang-coverage-engine.cc
engines/ptrace.cc
Expand Down
2 changes: 1 addition & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.8.4)
cmake_minimum_required (VERSION 3.12)
project (kcov-tests)

list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
Expand Down

0 comments on commit 1d036f7

Please sign in to comment.