Skip to content

Commit 6e8099e

Browse files
committed
XXX First shot at CI builds
1 parent 9fd1238 commit 6e8099e

File tree

2 files changed

+87
-6
lines changed

2 files changed

+87
-6
lines changed

.github/workflows/build.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#
2+
# build.yml - GitHub build action for libserialport adapted from AVRDUDE
3+
# Copyright (C) 2021 Marius Greuel
4+
# Copyright (C) 2024 Hans Ulrich Niedermann
5+
#
6+
# This program is free software; you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation; either version 2 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This program is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this program. If not, see <http://www.gnu.org/licenses/>.
18+
#
19+
20+
name: Build
21+
22+
on:
23+
push:
24+
branches-ignore:
25+
- 'onlinedocs'
26+
pull_request:
27+
branches-ignore:
28+
- 'onlinedocs'
29+
workflow_call:
30+
31+
jobs:
32+
linux-x86_64-autotools:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@v3
36+
- name: Install prerequisites
37+
run: >-
38+
sudo apt-get update
39+
40+
sudo apt-get install -y
41+
build-essential
42+
automake
43+
libtool
44+
- name: Configure
45+
run: >-
46+
./autogen.sh
47+
48+
mkdir _atbuild && cd _atbuild
49+
50+
../configure
51+
--prefix=$PWD/../_amprefix
52+
- name: Build
53+
run: make -C _atbuild -j$(nproc)
54+
- name: Install
55+
run: sudo make -C _atbuild install
56+
- name: distcheck
57+
run: make -C _atbuild -j$(nproc) distcheck
58+
- name: List installed files
59+
run: find _amprefix | env LC_ALL=C sort
60+
61+
linux-x86_64-cmake:
62+
runs-on: ubuntu-latest
63+
steps:
64+
- uses: actions/checkout@v3
65+
- name: Install prerequisites
66+
run: >-
67+
sudo apt-get update
68+
69+
sudo apt-get install -y
70+
build-essential
71+
cmake -D CMAKE_INSTALL_PREFIX:PATH=$PWD/_cmprefix
72+
- name: Configure
73+
run: >-
74+
cmake
75+
-B build
76+
- name: Build
77+
run: cmake --build build
78+
- name: Install
79+
run: sudo cmake --build build --target install
80+
- name: List installed files
81+
run: find _cmprefix | env LC_ALL=C sort

CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# @configure_input@
1+
# CMakeLists.txt. Generated from CMakeLists.txt.in by configure.ac.
22

33
cmake_minimum_required(VERSION 3.14)
44

55
project(libserialport
6-
VERSION "@PACKAGE_VERSION@"
7-
DESCRIPTION "@PACKAGE_NAME@"
8-
HOMEPAGE_URL "@PACKAGE_URL@"
6+
VERSION "0.1.1.23"
7+
DESCRIPTION "avrdudes bugfix fork of sigrok libserialport"
8+
HOMEPAGE_URL "https://github.com/avrdudes/libserialport"
99
LANGUAGES C
1010
)
1111

@@ -46,8 +46,8 @@ target_include_directories(libserialport
4646
set_target_properties(libserialport PROPERTIES
4747
PREFIX ""
4848
PUBLIC_HEADER "libserialport.h"
49-
VERSION @CMAKE_LIB_VERSION@
50-
SOVERSION @CMAKE_LIB_SOVERSION@
49+
VERSION sp_lib_version_major.sp_lib_version_minor.sp_lib_version_micro
50+
SOVERSION 1
5151
)
5252

5353
install(TARGETS libserialport

0 commit comments

Comments
 (0)