Skip to content

Commit

Permalink
Merge pull request #16 from mac-can/development
Browse files Browse the repository at this point in the history
Release Candidate 1 for Version 0.2.7 - macOS and Linux
  • Loading branch information
mac-can authored Nov 6, 2023
2 parents 4e088ff + 35eb6d5 commit c255e49
Show file tree
Hide file tree
Showing 47 changed files with 1,388 additions and 769 deletions.
50 changes: 25 additions & 25 deletions Deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ _All rights reserved._

### Preparation

1. Update the PCBUSB header file in `$(PROJROOT)/Sources/PCANBasic` from MacCAN´s website
when required and commit them with commit comment:
1. If necessary, update the PCBUSB header file in `$(PROJROOT)/Sources/PCANBasic`
from MacCAN´s website and commit it with commit comment:
- `Update PCBUSB header file (version `_n_`.`_n_`.`_n_`)` \
`- `_list of major changes (optional)_
2. Update the CAN API V3 sources in `$(PROJROOT)/Sources/CANAPI` from SVN repo
when required and commit them with commit comment:
2. If necessary, update the CAN API V3 sources in `$(PROJROOT)\Sources\CANAPI`
from the SVN repo and commit them with commit comment:
- `Update CAN API V3 sources to rev. `_nnn_ \
`- `_list of major changes (optional)_
3. Update the CAN API V3 testing sources in `$(PROJROOT)/Tests/CANAPI` from SVN repo
when required and commit them with commit comment:
3. If necessary, update the CAN API V3 testing sources in `$(PROJROOT)\Tests`
from the SVN repo and commit them with commit comment:
- `Update CAN API V3 testing sources to rev. `_nnn_ \
`- `_list of major changes (optional)_
4. Check and update the version and date information in the following files:
Expand All @@ -43,58 +43,59 @@ _All rights reserved._
### Procedure

1. Check the working directory for uncommitted changes.
- _**There should not be any uncommitted change.**_
- _If there are uncommitted changes then commit them or revert them._
- _**There should not be any uncommitted changes.**_
- _If there are uncommitted changes then commit or undo them._
2. Open the trial program with Xcode and run a code analysis.
- _**There should not be any serious finding.**_
- _If there are findings then fix them or create an issue in the repo._
3. Select the Xcode Testing target and run all test cases:
- _**There should be no failed test case.**_
- _If there are failed tests then fix the root cause or define a workaround._
4. Run the `Makefile` in the project root directory.
- _**There should be absolute no compiler or linker error!**_
5. Run the `Makefile` in the project root directory with option `BINARY=UNIVERSAL`.
- _**There should be absolutely no compiler or linker error!**_
- _If there are compiler or linker warnings then think twice._
5. Try out the trial program with different options.
6. Try out the trial program with different options.
- _**There should be no crash, hangup, or any other error.**_
- _If there is an error then fix it or create an issue in the repo._
6. Try out the utilities with different options.
7. Try out the utilities with different options.
- _**There should be no crash, hangup, or any other error.**_
- _If there is an error then fix it or create an issue in the repo._
7. Build and try out the examples (repair them if necessary);
8. Build and try out the examples (repair them when necessary);
- `$(PROJROOT)/Examples/C++`
- `$(PROJROOT)/Examples/Python`

### Pull Request

1. Update the `README.md` (e.g. development environment, supported devices, etc.).
2. Push the feature branch onto the remote repo.
3. Create a pull request and name it somehow like '**Release Candidate _n_ for**...'.
2. Push the feature branch to the remote repo.
3. Create a pull request and name it somehow like '**Release Candidate _n_ for** ...'.
4. Review the changes and merge the feature branch into the default branch.

## Create the Release Tag

### Preparation

1. Pull or clone the default branch on all development systems.
>>> Don't forget the Linux system! <<<
2. Double check all version numbers again (see above).
3. Run the `Makefile` in the project root directory:
- `uv-pc013mac:~ eris$ cd $(PROJROOT)`
- `uv-pc013mac:PCBUSB eris$ make pristine`
- `uv-pc013mac:PCBUSB eris$ make all`
- `uv-pc013mac:PCBUSB eris$ make BINARY=UNIVERSAL`
- `uv-pc013mac:PCBUSB eris$ make test`
- `uv-pc013mac:PCBUSB eris$ sudo make install`
4. Build the CAN API V3 GoogleTest program:
- `uv-pc013mac:~ eris$ cd $(PROJROOT)/Tests/CANAPI`
- `uv-pc013mac:CANAPI eris$ make pristine`
- `uv-pc013mac:CANAPI eris$ make all`
5. Run the CAN API V3 GoogleTest with two PCAN-USB device:
5. Run the CAN API V3 GoogleTest program with two PCAN-USB devices:
- `uv-pc013mac:CANAPI eris$./pcb_testing --can_dut1=PCAN-USB1 --can_dut2=PCAN-USB2 --gtest_output=xml:TestReport_PCAN-USB.xml --run_all=YES --smoketest_frames=100000` [...]
- _If there is any error then **stop** here or create an issue for each error in the repo._
- Copy the test report into the binaries directory `$(PROJROOT)/Binaries`.
6. Run the CAN API V3 GoogleTest with two PCAN-USB FD device:
- Copy the test report into the binary's directory `$(PROJROOT)/Binaries`.
6. Run the CAN API V3 GoogleTest program with two PCAN-USB FD devices:
- `uv-pc013mac:CANAPI eris$./pcb_testing --can_dut1=PCAN-USB3 --can_dut2=PCAN-USB4 --gtest_output=xml:TestReport_PCAN-USB_FD.xml --run_all=YES --smoketest_frames=100000` [...]
- _If there is any error then **stop** here or create an issue for each error in the repo._
- Copy the test report into the binaries directory `$(PROJROOT)/Binaries`.
- Copy the test report into the binary's directory `$(PROJROOT)/Binaries`.
7. Pack the artifacts into a .zip-archive, e.g. `artifacts.zip`:
- `$(PROJROOT)/Binaries/*.*`
- `$(PROJROOT)/Includes/*.*`
Expand All @@ -106,20 +107,19 @@ _All rights reserved._

1. Click on `Draft a new release` in the [GitHub](https://github.com/mac-can/PCANBasic-Wrapper) repo.
2. Fill out all required fields:
- Tag version: e.g `v0.2.5` (cf. semantic versioning)
- Tag version: e.g `v0.2.6` (cf. semantic versioning)
- Target: `main` (default branch)
- Release title: e.g. `Release of August 24, 2023`
- Release title: e.g. `Release of November 6, 2023`
- Change-log: list all major changes, e.g. from commit comments
- Assets: drag and drop the artifacts archive (see above)
3. Click on `Publish release`.
4. That´s all folks!

### Announce the new Release
## Announce the new Release

1. Create a new post with the change-log in the `mac-can.github.io` repo.
2. Update the PCBUSB wrapper page in the `mac-can.github.io` repo.
2. Update the PCBUSB-Wrapper page in the `mac-can.github.io` repo.
3. Post the new release on
[Twitter](https://twitter.com/uv_software),
[LinkedIn](https://linkedin.com/in/uwe-vogt-software),
[Facebook](https://facebook.com/uvsoftware.berlin),
etc.
2 changes: 1 addition & 1 deletion Examples/C++/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ OS := $(shell sh -c 'uname 2>/dev/null || echo Unknown OS')
ifeq ($(OS),Darwin) # macOS - libPeakCAN.dylib
LIBRARY = libPeakCAN.a
CXXFLAGS =
LDFLAGS =
LDFLAGS = -rpath /usr/local/lib
CXX = clang++
LD = clang++
RM = rm -f
Expand Down
7 changes: 4 additions & 3 deletions Libraries/CANAPI/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ LIBRARY = libUVCANPCB

MAJOR = 0
MINOR = 2
PATCH = 6
PATCH = 7

VERSION = $(MAJOR).$(MINOR).$(PATCH)
TARGET = $(LIBRARY).$(VERSION).dylib
Expand Down Expand Up @@ -103,7 +103,8 @@ LDFLAGS += -lpthread \
-nostartfiles -dynamiclib -fvisibility=hidden \
-Wl,-install_name,$(INSTALL_NAME) \
-Wl,-current_version,$(CURRENT_VERSION) \
-Wl,-compatibility_version,$(COMPATIBILITY_VERSION)
-Wl,-compatibility_version,$(COMPATIBILITY_VERSION) \
-rpath $(INSTALL)

LTFLAGS += -static

Expand All @@ -125,7 +126,7 @@ LIBRARY = libuvcanpcb

MAJOR = 0
MINOR = 2
PATCH = 6
PATCH = 7

VERSION = $(MAJOR).$(MINOR).$(PATCH)
SONAME = $(LIBRARY).so
Expand Down
7 changes: 4 additions & 3 deletions Libraries/PeakCAN/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ LIBRARY = libPeakCAN

MAJOR = 0
MINOR = 2
PATCH = 6
PATCH = 7

VERSION = $(MAJOR).$(MINOR).$(PATCH)
TARGET = $(LIBRARY).$(VERSION).dylib
Expand Down Expand Up @@ -103,7 +103,8 @@ LDFLAGS += -lpthread \
-nostartfiles -dynamiclib -fvisibility=hidden \
-Wl,-install_name,$(INSTALL_NAME) \
-Wl,-current_version,$(CURRENT_VERSION) \
-Wl,-compatibility_version,$(COMPATIBILITY_VERSION)
-Wl,-compatibility_version,$(COMPATIBILITY_VERSION) \
-rpath $(INSTALL)

LTFLAGS += -static

Expand All @@ -125,7 +126,7 @@ LIBRARY = libpeakcan

MAJOR = 0
MINOR = 2
PATCH = 6
PATCH = 7

VERSION = $(MAJOR).$(MINOR).$(PATCH)
SONAME = $(LIBRARY).so
Expand Down
6 changes: 3 additions & 3 deletions Sources/CANAPI/CANAPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
///
/// \author $Author: haumea $
//
/// \version $Rev: 1143 $
/// \version $Rev: 1212 $
//
/// \defgroup can_api CAN Interface API, Version 3
/// \{
Expand Down Expand Up @@ -357,7 +357,7 @@ class CANCPP CCanApi {
//
/// \returns 0 if successful, or a negative value on error.
//
virtual CANAPI_Return_t ReadMessage(CANAPI_Message_t &message, uint16_t timeout = CANREAD_INFINITE) = 0;
virtual CANAPI_Return_t ReadMessage(CANAPI_Message_t &message, uint16_t timeout = CANWAIT_INFINITE) = 0;

/// \brief retrieves the status register of the CAN interface.
//
Expand Down Expand Up @@ -478,4 +478,4 @@ class CANCPP CCanApi {
/// \}
#endif // CANAPI_H_INCLUDED
/// \}
// $Id: CANAPI.h 1143 2023-08-13 17:50:24Z haumea $ Copyright (c) UV Software //
// $Id: CANAPI.h 1212 2023-10-04 15:41:24Z haumea $ Copyright (c) UV Software //
11 changes: 7 additions & 4 deletions Sources/CANAPI/CANAPI_Types.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
*
* @author $Author: haumea $
*
* @version $Rev: 1128 $
* @version $Rev: 1212 $
*
* @addtogroup can_api
* @{
Expand Down Expand Up @@ -290,11 +290,14 @@ extern "C" {
#define CANBRD_NOT_TESTABLE (-2) /**< CAN board not testable (e.g. legacy API) */
/** @} */

/** @name Blocking Read
* @brief Control of blocking read
/** @name Blocking Operations
* @brief Control of blocking operations
* @{ */
#define CANREAD_INFINITE 65535U /**< infinite time-out (blocking read) */
#define CANWAIT_INFINITE 65535U /**< infinite time-out (blocking operation) */
#define CANKILL_ALL (-1) /**< to signal all waiting event objects */
/* aliases (legacy names) */
#define CANREAD_INFINITE CANWAIT_INFINITE /**< blocking read */
#define CANWRITE_INFINITE CANWAIT_INFINITE /**< blocking write */
/** @} */

/** @name Property IDs
Expand Down
4 changes: 2 additions & 2 deletions Sources/CANAPI/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
### CAN Interface API, Version 3

_Copyright &copy; 2004-2023 Uwe Vogt, UV Software, Berlin ([email protected])_ \
_Copyright &copy; 2004-2023 Uwe Vogt, UV Software, Berlin ([email protected])_ \
_All rights reserved._

Version $Rev: 1187 $
Version $Rev: 1212 $

# A CAN Interface Wrapper Specification

Expand Down
Loading

0 comments on commit c255e49

Please sign in to comment.