Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add version suffix #3

Draft
wants to merge 70 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
1136d76
Windows: don't fail if WaitCommEvent was aborted due to thread exit
Aug 31, 2024
f5e4821
Add libserialport.h to dist tarball
ndim Feb 24, 2024
ebfcf02
Fix distcheck target (distclean generated ChangeLog)
ndim Feb 24, 2024
40bb49d
Group generating and cleaning up ChangeLog file
ndim Feb 24, 2024
3f57100
XXX Detect git, doxygen before using it
ndim Feb 24, 2024
3edbada
XXX Add more files to dist tarball
ndim Feb 24, 2024
458120e
configure.ac: AC_DEFINE_UNQUOTED for SP_PACKAGE_VERSION_STRING
ndim Feb 24, 2024
5eb4785
configure.ac: one AC_INIT argument per line for better overview
ndim Feb 23, 2024
f4c96b2
configure.ac: add safety net for sp_package_* macros
ndim Feb 23, 2024
5a79fe4
configure.ac: Change package name, bugreport and url for avrdudes fork
ndim Feb 24, 2024
9250937
RRR Update libserialport.h version info when necessary
ndim Feb 24, 2024
9fb9d8d
configure.ac: Add tweak number
ndim Feb 24, 2024
98b82f3
Group all m4 version definitions at the top
ndim Feb 25, 2024
31b78ea
XXX CMakeLists.txt
ndim Feb 24, 2024
672b35c
XXX First shot at CI builds
ndim Feb 26, 2024
77ef345
XXX CI
ndim Feb 26, 2024
d6e319e
XXX cmake checkpoint
ndim Feb 26, 2024
9f07979
XXX fix include dir search sequence for config.h
ndim Feb 26, 2024
049af6b
XXX
ndim Feb 26, 2024
420b6ca
CI: Change to /usr/local to prevent weird libdir
ndim Feb 26, 2024
f86a28b
test-builds.sh
ndim Feb 26, 2024
beece5f
XXX Make "doc" target work with out of tree builds
ndim Feb 26, 2024
cb77bf1
Add note about avrdude fork to README and libserialport.h
ndim Feb 26, 2024
c27ef11
XXX test-builds.sh
ndim Feb 26, 2024
eca8fec
XXX substitution
ndim Feb 26, 2024
a4d4dbf
test-builds.sh: mingw cross build
ndim Feb 26, 2024
f22b1cc
CI: Debian for i386, armhf, arm64
ndim Feb 26, 2024
592ae79
CI: add macos
ndim Feb 26, 2024
9d96733
CI: add msvc and mingw builds for windows
ndim Feb 26, 2024
6e9a6e9
XXX Add default/hidden attrs and __declspec(dllexport)
ndim Feb 26, 2024
dc840b7
CI: combine workflow stuff
ndim Feb 26, 2024
386afcf
CI: workflow step name quoting
ndim Feb 26, 2024
98b1bcd
CI: blindly throwing bits at CI
ndim Feb 26, 2024
f43a62c
ci: tryp macos frameworks
ndim Feb 26, 2024
fef4f21
CI: stop using sudo for installing to DESTDIR
ndim Feb 26, 2024
84e5e34
CI: misc fixes
ndim Feb 26, 2024
fb458b2
CI foo
ndim Feb 26, 2024
160f532
XXX test-builds.sh
ndim Feb 26, 2024
05d8b4f
Actually add windows.h.in
ndim Feb 26, 2024
a9c30c6
CI: one fix
ndim Feb 26, 2024
db72d3e
ci: mingw package names
ndim Feb 26, 2024
8db31c3
remove unused CMakeLists.txt substitutions from Makefile.am
ndim Feb 26, 2024
b568804
chmod -w for git clones
ndim Feb 26, 2024
677b75f
clean up test-builds.sh to work on FreeBSD
ndim Feb 26, 2024
41bb3a0
HACK test_timing.c: enlarge the valid time interval a bit
ndim Feb 26, 2024
df8d308
sed-subst: chmod a-w, chmod +w
ndim Feb 26, 2024
f9658c8
gitignore: dirs generated by test-builds.sh
ndim Feb 26, 2024
bd65842
ci: separate job for autoreconf
ndim Feb 26, 2024
2ebe189
ci: consistent step labels across jobs
ndim Feb 26, 2024
f4cf24c
probably not needing hid on windows (this is not avrdude)
ndim Feb 26, 2024
026ee4b
HACK windows string length thing
ndim Feb 26, 2024
f6dc1ef
ci: fix dir names
ndim Feb 26, 2024
055ba9c
make cmake --build also --verbose
ndim Feb 27, 2024
1225d8e
Add source files in CMakeLists.txt I had forgotten
ndim Feb 27, 2024
273b8ef
ci/cmake stuff
ndim Feb 27, 2024
ca43a42
mingw: add autoconf
ndim Feb 27, 2024
f53240a
try actions/checkout@v4
ndim Feb 27, 2024
956a56b
mingw autoconf2.72
ndim Feb 27, 2024
65c6f28
setting ACLOCAL for mingw
ndim Feb 27, 2024
05bae21
Trying to work with tool versions for AUTO* for mingw
ndim Feb 27, 2024
30a9a4b
See whether mingw ucrt64 build might succeed without -Werror
ndim Feb 27, 2024
1209b41
ci typo fix
ndim Feb 27, 2024
3b7ccab
update script tuning
ndim Feb 27, 2024
8d598db
add autotools build on macos
ndim Feb 27, 2024
d6452e8
try MSVC and MINGW with LIBSERIALPORT_MSBUILD
ndim Feb 27, 2024
0e447e0
Choose either one of LIBSERIALPORT_(AT|MS)BUILD
ndim Feb 27, 2024
fec338d
XXX line endings, .gitattributes, etc
ndim Feb 27, 2024
077891a
ci: msvc install stuff
ndim Feb 27, 2024
d8b35d4
Try windows builds without TR CRLF cleanups
ndim Feb 27, 2024
34a8286
more CMakeLists.txt header
ndim Feb 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
* text=auto eol=lf
*.sln text eol=crlf
*.vcxproj text eol=crlf
*.vcxproj.filters text eol=crlf
264 changes: 264 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,264 @@
#
# build.yml - GitHub build action for libserialport adapted from AVRDUDE
# Copyright (C) 2021 Marius Greuel
# Copyright (C) 2024 Hans Ulrich Niedermann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#

name: Build

on:
push:
branches-ignore:
- 'onlinedocs'
pull_request:
branches-ignore:
- 'onlinedocs'
workflow_call:

env:
BUILD_TYPE: RelWithDebInfo

jobs:

linux-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: >-
sudo apt-get update

sudo apt-get install -y
build-essential
cmake
automake
libtool
- name: "at: autoreconf"
run: >-
./autogen.sh
- name: "at: configure"
run: >-
mkdir _build-at && cd _build-at

../configure
--prefix=/usr/local
- name: "at: build"
run: make -C _build-at -j$(nproc)
- name: "at: install"
run: make -C _build-at install DESTDIR=$PWD/_dest-at
- name: "at: list installed files"
run: find _dest-at | env LC_ALL=C sort | sed 's|^_dest-at||'
- name: "at: distcheck"
run: make -C _build-at -j$(nproc) distcheck
- name: "cm: configure"
run: >-
cmake
-B _build-cm
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_INSTALL_PREFIX:PATH=/usr/local
- name: "cm: build"
run: cmake --build _build-cm
- name: "cm: install"
run: cmake --build _build-cm --target install DESTDIR=$PWD/_dest-cm
- name: "cm: list installed files"
run: find _dest-cm | env LC_ALL=C sort | sed 's|^_dest-cm||'

linux:
runs-on: ubuntu-latest
container: debian:11
strategy:
matrix:
include:
- { arch: i386, processor: i686, prefix: i686-linux-gnu, inc-lib: i386-linux-gnu }
- { arch: armhf, processor: armhf, prefix: arm-linux-gnueabihf, inc-lib: arm-linux-gnueabihf }
- { arch: arm64, processor: aarch64, prefix: aarch64-linux-gnu, inc-lib: aarch64-linux-gnu }
steps:
- uses: actions/checkout@v4
- name: Add architecture
run: |
dpkg --add-architecture ${{matrix.arch}}
apt-get update
- name: Install prerequisites
run: >-
apt-get update

apt-get install -y
git
cmake
automake
libtool
crossbuild-essential-${{matrix.arch}}
- name: "cm: configure"
run: >-
cmake
-D DEBUG_CMAKE=1
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-D CMAKE_SYSTEM_NAME=Linux
-D CMAKE_SYSTEM_PROCESSOR=${{matrix.processor}}
-D CMAKE_C_COMPILER=${{matrix.prefix}}-gcc
-D CMAKE_FIND_ROOT_PATH=/usr/${{matrix.prefix}}
-D CMAKE_INCLUDE_PATH=/usr/include/${{matrix.inc-lib}}
-D CMAKE_LIBRARY_PATH=/usr/lib/${{matrix.inc-lib}}
-B _build-cm
- name: "cm: build"
run: cmake --build _build-cm
- name: "cm: install"
run: cmake --build _build-cm --target install DESTDIR=$PWD/_dest-cm
- name: "cm: list installed files"
run: find _dest-cm | env LC_ALL=C sort | sed 's|^_dest-cm||'
- name: "at: autoreconf"
run: >-
./autogen.sh
- name: "at: configure"
run: >-
mkdir _build-at && cd _build-at

../configure
--prefix=/usr/local
- name: "at: build"
run: make -C _build-at -j$(nproc)
- name: "at: install"
run: make -C _build-at install DESTDIR=$PWD/_dest-at
- name: "at: list installed files"
run: find _dest-at | env LC_ALL=C sort | sed 's|^_dest-at||'

macos-x86_64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Install prerequisites
run: >-
# brew update

brew install
cmake
automake
autoconf
libtool
- name: "cm: configure"
run: >-
cmake
-D CMAKE_C_FLAGS=-I/usr/local/include
-D CMAKE_EXE_LINKER_FLAGS=-L/usr/local/Cellar
-D DEBUG_CMAKE=1
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-B _build-cm
- name: "cm: build"
run: cmake --build _build-cm --verbose
- name: "cm: install"
run: cmake --build _build-cm --target install DESTDIR=$PWD/_dest-cm
- name: "cm: list installed files"
run: find _dest-cm | env LC_ALL=C sort | sed 's|^_dest-cm||'
- name: "at: autoreconf"
run: >-
./autogen.sh
- name: "at: configure"
run: >-
mkdir _build-at && cd _build-at

../configure
--prefix=/usr/local
- name: "at: build"
run: make -C _build-at -j$(nproc)
- name: "at: install"
run: make -C _build-at install DESTDIR=$PWD/_dest-at
- name: "at: list installed files"
run: find _dest-at | env LC_ALL=C sort | sed 's|^_dest-at||'

msvc:
runs-on: windows-latest
strategy:
matrix:
include:
- { arch: x86, platform: Win32 }
- { arch: x64, platform: x64 }
- { arch: arm64, platform: ARM64 }
steps:
- uses: actions/checkout@v4
- name: "cm: configure"
run: >-
cmake
-A ${{matrix.platform}}
-D DEBUG_CMAKE=1
-D CMAKE_SYSTEM_VERSION=11
-D CMAKE_C_FLAGS_RELWITHDEBINFO="/MT /GL /Zi /O2 /Ob1 /DNDEBUG"
-D CMAKE_CXX_FLAGS_RELWITHDEBINFO="/MT /GL /Zi /O2 /Ob1 /DNDEBUG"
-D CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO="/DEBUG /INCREMENTAL:NO /LTCG /OPT:REF /OPT:ICF"
-B _build-cm
- name: "cm: build"
run: cmake --build _build-cm --config ${{env.BUILD_TYPE}} --verbose
- name: "cm: install"
run: cmake --build _build-cm --target install

# This is running in powershell, not sh. Therefore find, env,
# sort do not work as usual.

mingw:
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
include:
- { sys: mingw64, env: x86_64 }
- { sys: ucrt64, env: ucrt-x86_64 }
- { sys: clang64, env: clang-x86_64 }
steps:
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
base-devel
mingw-w64-${{matrix.env}}-gcc
mingw-w64-${{matrix.env}}-cmake
automake1.16
autoconf2.72
mingw-w64-${{matrix.env}}-libtool
- name: "cm: configure"
run: >-
cmake
-G"MSYS Makefiles"
-D DEBUG_CMAKE=1
-D CMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-B _build-cm
- name: "cm: build"
run: cmake --build _build-cm --verbose
- name: "cm: install"
run: cmake --build _build-cm --target install DESTDIR=$PWD/_dest-cm
- name: "cm: list installed files"
run: find _dest-cm | env LC_ALL=C sort | sed 's|^_dest-cm||'
- name: "at: autoreconf"
run: >-
ACV=-2.72

AMV=-1.16

env ACLOCAL=aclocal$AMV AUTOMAKE=automake$AMV AUTORECONF=autoreconf$ACV AUTOCONF=autoconf$ACV AUTOM4TE=autom4te$ACV AUTOHEADER=autoheader$ACV ./autogen.sh
- name: "at: configure"
run: >-
mkdir _build-at && cd _build-at

../configure
--prefix=/usr/local
- name: "at: build"
run: make -C _build-at -j$(nproc)
- name: "at: install"
run: make -C _build-at install DESTDIR=$PWD/_dest-at
- name: "at: list installed files"
run: find _dest-at | env LC_ALL=C sort | sed 's|^_dest-at||'
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,12 @@ Debug/
Release/
x64/
*.vcxproj.user

/_amb/
/_amb-*/
/_amd/
/_amd-*/
/_cmb/
/_cmb-*/
/_cmd/
/_cmd-*/
Loading