Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
protobuf-c
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
spbro
protobuf-c
Commits
be364aa0
Unverified
Commit
be364aa0
authored
Jan 18, 2025
by
Robert Edmonds
Committed by
GitHub
Jan 18, 2025
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #754 from protobuf-c/edmonds/ci/ubuntu-updates
build.yml: Ubuntu: Add 22.04, 24.04
parents
6efd7db3
fd07ca75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
94 additions
and
30 deletions
+94
-30
.github/workflows/build.yml
.github/workflows/build.yml
+94
-30
No files found.
.github/workflows/build.yml
View file @
be364aa0
name
:
Test Build
name
:
Test Builds
on
:
push
:
branches
:
-
master
-
next
pull_request
:
types
:
[
opened
,
reopened
,
synchronize
,
edited
,
ready_for_review
,
review_requested
]
schedule
:
-
cron
:
'
0
0
*
*
5'
# Every Friday at 00:00
jobs
:
distcheck
:
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
os
:
[
macos-latest
,
ubuntu-2
0
.04
]
os
:
[
macos-latest
,
ubuntu-2
2.04
,
ubuntu-24
.04
]
fail-fast
:
false
runs-on
:
${{ matrix.os }}
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Checkout protobuf-c
uses
:
actions/checkout@v4
-
name
:
Install Linux dependencies
if
:
startsWith(matrix.os, 'ubuntu')
run
:
|
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev
sudo apt-get update -q -y
sudo apt-get install -q -y \
libprotobuf-dev \
libprotoc-dev \
protobuf-compiler \
;
-
name
:
Install Mac dependencies
if
:
startsWith(matrix.os, 'macos')
run
:
brew install protobuf automake libtool
-
name
:
Run distcheck
run
:
|
./autogen.sh
...
...
@@ -32,28 +46,41 @@ jobs:
make -j${nproc} distcheck VERBOSE=1
distcheck-multiarch
:
runs-on
:
ubuntu-20.04
runs-on
:
ubuntu-24.04
strategy
:
matrix
:
include
:
-
arch
:
armv7
-
arch
:
aarch64
-
arch
:
riscv64
-
arch
:
s390x
-
arch
:
ppc64le
fail-fast
:
false
steps
:
-
uses
:
actions/checkout@v4
-
uses
:
uraimo/run-on-arch-action@v2
name
:
Install dependencies and run distcheck
-
name
:
Checkout protobuf-c
uses
:
actions/checkout@v4
-
name
:
Install dependencies and run distcheck on multiple arches
uses
:
uraimo/run-on-arch-action@v2
id
:
runcmd
with
:
arch
:
${{ matrix.arch }}
githubToken
:
${{ github.token }}
distro
:
ubuntu2
0
.04
distro
:
ubuntu2
2
.04
install
:
|
apt-get update -q -y
apt-get install -q -y build-essential autoconf automake libtool pkg-config
apt-get install -q -y protobuf-compiler libprotobuf-dev libprotoc-dev
apt-get install -q -y \
autoconf \
automake \
build-essential \
libprotobuf-dev \
libprotoc-dev \
libtool \
pkg-config \
protobuf-compiler \
;
run
:
|
./autogen.sh
...
...
@@ -61,28 +88,53 @@ jobs:
make -j3 distcheck VERBOSE=1
valgrind
:
runs-on
:
ubuntu-20.04
runs-on
:
ubuntu-24.04
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Checkout protobuf-c
uses
:
actions/checkout@v4
-
name
:
Install dependencies
run
:
|
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev valgrind
sudo apt-get update -q -y
sudo apt-get install -q -y \
libprotobuf-dev \
libprotoc-dev \
protobuf-compiler \
valgrind \
;
-
name
:
Run distcheck with valgrind
run
:
|
./autogen.sh
./configure --enable-valgrind-tests CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined"
make -j${nproc} distcheck DISTCHECK_CONFIGURE_FLAGS="--enable-valgrind-tests CFLAGS=\"-fsanitize=undefined -fno-sanitize-recover=undefined\"" VERBOSE=1
./configure \
--enable-valgrind-tests \
CFLAGS="-fsanitize=undefined -fno-sanitize-recover=undefined" \
;
make -j${nproc} \
distcheck \
DISTCHECK_CONFIGURE_FLAGS="--enable-valgrind-tests CFLAGS=\"-fsanitize=undefined -fno-sanitize-recover=undefined\"" \
VERBOSE=1 \
;
coverage
:
runs-on
:
ubuntu-20.04
runs-on
:
ubuntu-24.04
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Checkout protobuf-c
uses
:
actions/checkout@v4
-
name
:
Install dependencies
run
:
|
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev lcov
-
name
:
Run coverage build
sudo apt-get update -q -y
sudo apt-get install -q -y \
lcov \
libprotobuf-dev \
libprotoc-dev \
protobuf-compiler \
;
-
name
:
Build protobuf-c and run coverage build
run
:
|
./autogen.sh
./configure --enable-code-coverage
...
...
@@ -91,30 +143,42 @@ jobs:
lcov --no-external --capture --initial --directory . --output-file ./coverage/lcov.info --include '*protobuf-c.c'
make check
lcov --no-external --capture --directory . --output-file ./coverage/lcov.info --include '*protobuf-c.c'
-
uses
:
coverallsapp/github-action@master
-
name
:
Upload Coveralls results
uses
:
coverallsapp/github-action@master
with
:
github-token
:
${{ secrets.GITHUB_TOKEN }}
cmake
:
runs-on
:
${{ matrix.os }}
strategy
:
matrix
:
build_type
:
[
Debug
,
Release
]
os
:
[
macos-latest
,
ubuntu-2
0
.04
]
os
:
[
macos-latest
,
ubuntu-2
2.04
,
ubuntu-24
.04
]
fail-fast
:
false
runs-on
:
${{ matrix.os }}
steps
:
-
uses
:
actions/checkout@v4
-
name
:
Checkout protobuf-c
uses
:
actions/checkout@v4
-
name
:
Install Linux dependencies
if
:
startsWith(matrix.os, 'ubuntu')
run
:
|
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libprotobuf-dev libprotoc-dev
-
name
:
Install Mac dependencies
if
:
startsWith(matrix.os, 'macos')
run
:
brew install protobuf abseil
-
name
:
Run cmake tests
-
name
:
Build protobuf-c and run tests
run
:
|
cmake -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=protobuf-c-bin -S "build-cmake" -B "build"
cmake -S build-cmake -B build \
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
-DCMAKE_INSTALL_PREFIX=protobuf-c-bin \
-DBUILD_TESTS=ON \
;
cmake --build "build" -j3
cmake --build "build" --target test
cmake --build "build" --target install
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment