Skip to content

Commit 81fd6b1

Browse files
authored
Fix build (#134)
Fix build
1 parent ce27845 commit 81fd6b1

33 files changed

+107
-64
lines changed

.github/workflows/.aarch64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
name: Build on aarch64
1616
steps:
1717
- uses: actions/[email protected]
18-
- uses: uraimo/run-on-arch-action@v2.1.1
18+
- uses: uraimo/run-on-arch-action@v2.8.1
1919
name: Build artifact
2020
id: build
2121
with:
2222
arch: aarch64
23-
distro: ubuntu20.04
23+
distro: ubuntu22.04
2424

2525
# Not required, but speeds up builds
2626
githubToken: ${{ github.token }}

.github/workflows/.armv6.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Build on armv6
1616
steps:
1717
- uses: actions/[email protected]
18-
- uses: uraimo/run-on-arch-action@v2.1.1
18+
- uses: uraimo/run-on-arch-action@v2.8.1
1919
name: Build artifact
2020
id: build
2121
with:

.github/workflows/.armv7.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
name: Build on armv7
1616
steps:
1717
- uses: actions/[email protected]
18-
- uses: uraimo/run-on-arch-action@v2.1.1
18+
- uses: uraimo/run-on-arch-action@v2.8.1
1919
name: Build artifact
2020
id: build
2121
with:

.github/workflows/.ppc64le.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
name: Build on ppc64le
1616
steps:
1717
- uses: actions/[email protected]
18-
- uses: uraimo/run-on-arch-action@v2.1.1
18+
- uses: uraimo/run-on-arch-action@v2.8.1
1919
name: Build artifact
2020
id: build
2121
with:
2222
arch: ppc64le
23-
distro: ubuntu20.04
23+
distro: ubuntu22.04
2424

2525
# Not required, but speeds up builds
2626
githubToken: ${{ github.token }}

.github/workflows/.riscv64.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
name: Build on riscv64
1616
steps:
1717
- uses: actions/[email protected]
18-
- uses: uraimo/run-on-arch-action@v2.5.1
18+
- uses: uraimo/run-on-arch-action@v2.8.1
1919
name: Build artifact
2020
id: build
2121
with:
2222
arch: riscv64
23-
distro: ubuntu20.04
23+
distro: ubuntu22.04
2424

2525
# Not required, but speeds up builds
2626
githubToken: ${{ github.token }}

.github/workflows/.s390x.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
name: Build on s390x
1616
steps:
1717
- uses: actions/[email protected]
18-
- uses: uraimo/run-on-arch-action@v2.1.1
18+
- uses: uraimo/run-on-arch-action@v2.8.1
1919
name: Build artifact
2020
id: build
2121
with:
2222
arch: s390x
23-
distro: ubuntu20.04
23+
distro: ubuntu22.04
2424

2525
# Not required, but speeds up builds
2626
githubToken: ${{ github.token }}

.github/workflows/.ubuntu.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,18 @@ on:
1717

1818
jobs:
1919
ubuntu:
20-
runs-on: ubuntu-20.04
20+
runs-on: ubuntu-22.04
2121
if: |
2222
(github.event_name == 'pull_request') ||
2323
(github.event_name == 'push') ||
2424
(github.event_name == 'workflow_dispatch' ||
2525
(github.event_name == 'schedule' && github.repository == 'tezc/sc')) && !contains(github.event.inputs.skip, 'ubuntu')
2626
name: Build on Ubuntu
27-
28-
strategy:
29-
fail-fast: false
30-
matrix:
31-
compiler: [ gcc, clang ]
3227
steps:
3328
- uses: actions/[email protected]
3429
- name: build
3530
env:
36-
CC: ${{ matrix.compiler }}
31+
CC: gcc
3732
run: |
3833
sudo apt update
3934
sudo apt-get install valgrind cmake
@@ -50,6 +45,31 @@ jobs:
5045
make -j
5146
make valgrind
5247
48+
ubuntu-clang:
49+
runs-on: ubuntu-22.04
50+
if: |
51+
(github.event_name == 'pull_request') ||
52+
(github.event_name == 'push') ||
53+
(github.event_name == 'workflow_dispatch' ||
54+
(github.event_name == 'schedule' && github.repository == 'tezc/sc')) && !contains(github.event.inputs.skip, 'ubuntu')
55+
name: Build on Ubuntu
56+
steps:
57+
- uses: actions/[email protected]
58+
- name: build
59+
env:
60+
CC: clang
61+
run: |
62+
sudo apt update
63+
sudo apt-get install valgrind cmake
64+
mkdir build-debug && cd build-debug
65+
cmake .. -DSANITIZER=address
66+
make -j
67+
make check
68+
rm -rf *
69+
cmake .. -DSANITIZER=undefined
70+
make -j
71+
make check
72+
5373
ubuntu-gcc-thread:
5474
runs-on: ubuntu-latest
5575
if: |
@@ -145,7 +165,7 @@ jobs:
145165
sudo apt update
146166
sudo apt-get install cmake curl tar wine
147167
mkdir build-debug && cd build-debug
148-
export ZIG=zig-linux-x86_64-0.12.0-dev.1834+f36ac227b
168+
export ZIG=zig-linux-x86_64-0.14.0-dev.3222+8a3aebaee
149169
curl -o zig.tar.xz "https://ziglang.org/builds/$ZIG.tar.xz"
150170
tar -xf zig.tar.xz
151171
export CC="$(pwd)/$ZIG/zig cc -target x86_64-windows"

CMakeLists.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5.1)
1+
cmake_minimum_required(VERSION 3.10)
22
project(sc_lib C)
33
include(CTest)
44
include(CheckCCompilerFlag)
@@ -68,11 +68,12 @@ if (SC_BUILD_TEST)
6868
add_custom_target(coverage)
6969
add_custom_command(
7070
TARGET coverage
71+
POST_BUILD
7172
COMMAND lcov --capture --directory .
72-
--output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert'
73+
--output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' --ignore-errors unused
7374
COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*'
74-
--output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert'
75-
COMMAND lcov --list coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert'
75+
--output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' --ignore-errors unused
76+
COMMAND lcov --list coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert' --ignore-errors unused
7677
)
7778

7879
# -------------------------- Code Coverage End ------------------------------ #

array/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5.1)
1+
cmake_minimum_required(VERSION 3.10)
22
project(sc_array C)
33

44
set(CMAKE_C_STANDARD 99)
@@ -96,6 +96,7 @@ if (SC_BUILD_TEST)
9696
add_custom_target(coverage_${PROJECT_NAME})
9797
add_custom_command(
9898
TARGET coverage_${PROJECT_NAME}
99+
POST_BUILD
99100
COMMAND lcov --capture --directory .
100101
--output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert'
101102
COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*'

buffer/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.5.1)
1+
cmake_minimum_required(VERSION 3.10)
22
project(sc_buf C)
33

44
set(CMAKE_C_STANDARD 99)
@@ -31,7 +31,7 @@ if (SC_BUILD_TEST)
3131
set(CMAKE_C_CLANG_TIDY
3232
clang-tidy;
3333
-line-filter=[{"name":"${PROJECT_NAME}.h"},{"name":"${PROJECT_NAME}.c"}];
34-
-checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*;
34+
-checks=clang-analyzer-*,misc-*,portability-*,bugprone-*,-bugprone-easily-swappable-parameters*,-misc-include-cleaner*;
3535
-warnings-as-errors=clang-analyzer-*,misc-*,portability-*,bugprone-*;)
3636
endif ()
3737

@@ -95,6 +95,7 @@ if (SC_BUILD_TEST)
9595
add_custom_target(coverage_${PROJECT_NAME})
9696
add_custom_command(
9797
TARGET coverage_${PROJECT_NAME}
98+
POST_BUILD
9899
COMMAND lcov --capture --directory .
99100
--output-file coverage.info --rc lcov_branch_coverage=1 --rc lcov_excl_br_line='assert'
100101
COMMAND lcov --remove coverage.info '/usr/*' '*example*' '*test*'

0 commit comments

Comments
 (0)