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

Update to new template and api118 #42

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
167 changes: 56 additions & 111 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,56 +26,47 @@ std-filters: &std-filters
workflows:
build_all:
jobs:
## --------------------
## OpenCPN 5.8 Plugins
## ----------------------
- build-android-arm64:
<<: *std-filters
- build-android-armhf:
<<: *std-filters
- build-flatpak-arm64-2208:
<<: *std-filters
- build-flatpak-x86-2208:
<<: *std-filters
- build-flatpak-arm64-2408:
<<: *std-filters
- build-flatpak-x86-2408:
<<: *std-filters
- build-msvc-wx32-2022:
<<: *std-filters
- build-debian-arm64-12-bookworm:
<<: *std-filters
- build-debian-armhf-12-bookworm:
<<: *std-filters
- build-debian-x86_64-12-bookworm:
<<: *std-filters
- build-debian-armhf-11-bullseye:
<<: *std-filters
- build-debian-arm64-11-bullseye:
<<: *std-filters
- build-debian-x86_64-11-bullseye:
<<: *std-filters
## KEEP needed for Jammy with wx32
- build-ubuntu-x86_64-2204-jammy:
<<: *std-filters
- build-macos-universal:
## OpenCPN 5.8 Plugins (Also work in 5.10)
## ----------------------
- build-android-arm64:
<<: *std-filters
- build-android-armhf:
<<: *std-filters
- build-flatpak-aarch64-2208:
<<: *std-filters
- build-flatpak-x86-2208:
<<: *std-filters
- build-flatpak-aarch64-2408:
<<: *std-filters
- build-flatpak-x86-2408:
<<: *std-filters
- build-msvc-wx32-2022:
<<: *std-filters
- build-debian-arm64-12-bookworm:
<<: *std-filters
- build-debian-armhf-12-bookworm:
<<: *std-filters
- build-debian-x86_64-12-bookworm:
<<: *std-filters
- build-debian-armhf-11-bullseye:
<<: *std-filters
- build-debian-arm64-11-bullseye:
<<: *std-filters
- build-debian-x86_64-11-bullseye:
<<: *std-filters
# KEEP needed for Jammy with wx32
- build-ubuntu-x86_64-2204-jammy:
<<: *std-filters
- build-macos-universal:
<<: *std-filters

## -------------------------------------------
## OpenCPN 5.6.2 Plugins Frozen - 28/05/2023
## ------------------------------------------
## Circleci will not build for macos 11 so removed - 18/10/2023
- build-macos:
<<: *std-filters
- build-msvc-2022:
<<: *std-filters

## -------------------------------------
## UBUNTU OS Frozen - 28/05/2023 DROP
## -------------------------------------
## KEEP needed for Raspbian OpenCPN v5.6
# - build-ubuntu-armhf-1804-buster:
# <<: *std-filters
- build-msvc-2022:
<<: *std-filters

orbs:
cloudsmith: cloudsmith/[email protected]
Expand Down Expand Up @@ -144,23 +135,9 @@ jobs:
- run: bash ci/circleci-build-android-armhf.sh
- deploy-code:
install_python: true
build-macos-wx32:
macos:
xcode: "13.4"
environment:
- OCPN_TARGET: macos
- CLOUDSMITH_PKG_EXT: pkg
- WX_VER: "32"
- DEPLOY_USE_ORB: false
steps:
- checkout
- run: chmod a+x ci/*.sh
- run: bash ci/circleci-build-macos.sh
- deploy-code:
deploy_use_orb: false
build-macos-universal:
macos:
xcode: "13.4"
xcode: "15.2.0"
environment:
OCPN_TARGET: macos
CMAKE_BUILD_PARALLEL_LEVEL: 2
Expand All @@ -171,25 +148,26 @@ jobs:
- checkout
- run: sudo chmod go+w /usr/local
- restore_cache:
key: "{{checksum \"build-deps/macos-cache-stamp\"}}\
-{{checksum \"cmake/MacosWxwidgets.cmake\"}}\
-{{checksum \"ci/circleci-build-macos-universal.sh\"}}"
key: "{{checksum \"build-deps/macos-cache-stamp\"}}\
-{{checksum \"cmake/MacosWxwidgets.cmake\"}}\
-{{checksum \"ci/circleci-build-macos-universal.sh\"}}"
- run: chmod a+x ci/*.sh
- run: chmod a+x cmake/*.sh
- run: ci/circleci-build-macos-universal.sh
- save_cache:
key: "{{checksum \"build-deps/macos-cache-stamp\"}}\
-{{checksum \"cmake/MacosWxwidgets.cmake\"}}\
-{{checksum \"ci/circleci-build-macos-universal.sh\"}}"
paths:
- /tmp/local.cache.tar
- /Users/distiller/project/cache
key: "{{checksum \"build-deps/macos-cache-stamp\"}}\
-{{checksum \"cmake/MacosWxwidgets.cmake\"}}\
-{{checksum \"ci/circleci-build-macos-universal.sh\"}}"
paths:
- /tmp/local.cache.tar
- /Users/distiller/project/cache
- run: >
sh -c "otool -L build/*.dylib"
- run: >
sh -c "cat build/*.xml"
- deploy-code:
deploy_use_orb: false
install_python: false
build-msvc-wx32-2022:
executor:
name: win/server-2022
Expand All @@ -207,12 +185,13 @@ jobs:
command: ci\circleci-build-msvc.bat
- deploy-code:
deploy_use_orb: false
build-flatpak-arm64-2208:
build-flatpak-aarch64-2208:
machine:
image: ubuntu-2204:current
resource_class: arm.medium
environment:
- OCPN_TARGET: flatpak-arm64
- OCPN_TARGET: flatpak
- BUILD_ARCH: aarch64
- FLATPAK_BRANCH: stable
- CLOUDSMITH_PKG_EXT: gz
- SDK_VER: 22.08
Expand All @@ -226,9 +205,9 @@ jobs:
build-flatpak-x86-2208:
machine:
image: ubuntu-2204:current
resource_class: arm.medium
environment:
- OCPN_TARGET: flatpak
- BUILD_ARCH: x86_64
- FLATPAK_BRANCH: stable
- CLOUDSMITH_PKG_EXT: gz
- SDK_VER: 22.08
Expand All @@ -240,12 +219,13 @@ jobs:
command: bash ci/circleci-build-flatpak.sh
no_output_timeout: 30m
- deploy-code
build-flatpak-arm64-2408:
build-flatpak-aarch64-2408:
machine:
image: ubuntu-2204:current
resource_class: arm.medium
environment:
- OCPN_TARGET: flatpak-arm64
- OCPN_TARGET: flatpak
- BUILD_ARCH: aarch64
- FLATPAK_BRANCH: stable
- CLOUDSMITH_PKG_EXT: gz
- SDK_VER: 24.08
Expand All @@ -259,9 +239,9 @@ jobs:
build-flatpak-x86-2408:
machine:
image: ubuntu-2204:current
resource_class: arm.medium
environment:
- OCPN_TARGET: flatpak
- BUILD_ARCH: x86_64
- FLATPAK_BRANCH: stable
- CLOUDSMITH_PKG_EXT: gz
- SDK_VER: 24.08
Expand Down Expand Up @@ -313,8 +293,7 @@ jobs:
- deploy-code
build-debian-x86_64-12-bookworm:
machine:
image: ubuntu-2204:current
resource_class: arm.medium
image: ubuntu-2404:current
environment:
- OCPN_TARGET: bookworm
- BUILD_GTK3: true
Expand All @@ -336,7 +315,7 @@ jobs:
environment:
- OCPN_TARGET=bullseye-armhf
- DOCKER_IMAGE=jongough/debian-armhf:bullseye
- BUILD_FLbuild-debian-arm64-12-bookwormAGS=-j3
- BUILD_FLAGS=-j3
- BUILD_ENV=debian
- BUILD_GTK3: true
- DEPLOY_USE_ORB: true
Expand Down Expand Up @@ -410,20 +389,6 @@ jobs:
## ---------------------
## OpenCPN 5.6.2 Plugins
## ---------------------
build-macos:
macos:
xcode: "13.4"
environment:
- OCPN_TARGET: macos
- CLOUDSMITH_PKG_EXT: pkg
- WX_VER: 315
- DEPLOY_USE_ORB: false
steps:
- checkout
- run: chmod a+x ci/*.sh
- run: bash ci/circleci-build-macos.sh
- deploy-code:
deploy_use_orb: false

## Appveyor doesn't build for Windows now.
## If below is used, WinXT will not work.
Expand All @@ -445,24 +410,4 @@ jobs:
- deploy-code:
deploy_use_orb: false

## -------------------------------------------
## Ubuntu OS - Generally deprecated and not used.
## -------------------------------------------
## KEEP needed for Raspbian OpenCPN v5.6
build-ubuntu-armhf-1804-buster:
machine:
image: ubuntu-2204:current
resource_class: arm.medium
environment:
- OCPN_TARGET=buster-armhf
- DOCKER_IMAGE=jongough/ubuntu-armhf:18.04
- BUILD_FLAGS=-j3
- BUILD_ENV=ubuntu
- DEPLOY_USE_ORB: true
steps:
- checkout
- run: chmod a+x ./ci/*.sh
- run:
command: ci/circleci-build-ubuntu-docker.sh
no_output_timeout: 30m
- deploy-code

4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
cmake-build*
.BATCH
.build
build/*
.idea*
.directory
po/POTFILES.in.test
temp
tmp
master.zip
OCPNAndroidCommon*
36 changes: 19 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@
## * xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx, *
## * xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx *
#-----------------------------------------------------------------------------
# Frontend2 Author: Jon Gough Testplugin(TP)
# v1.0.304.0 20/09/2024 DD/MM/YYYY
# Frontend2 Author: Jon Gough Testplugin(TP) v1.0.326.0 18/01/2025 DD/MM/YYYY
# buildCI:yes useODAPI:no validateJSON:no
# ---------------------------------------------------------------------------
## -- When changing this file do NOT change the order of the sections. -- ##
Expand All @@ -32,7 +31,7 @@ set(CMLOC "CMakeLists: ")

# define minimum cmake version
cmake_minimum_required(VERSION 3.5.1)
if (COMMAND cmake_policy)
if(COMMAND cmake_policy)
if (POLICY CMP0043)
cmake_policy(SET CMP0043 NEW)
endif (POLICY CMP0043)
Expand Down Expand Up @@ -62,13 +61,13 @@ set(LONG_DESCRIPTION

set(VERSION_MAJOR "0")
set(VERSION_MINOR "53")
set(VERSION_PATCH "0")
set(VERSION_PATCH "2")
set(VERSION_TWEAK "0")
set(VERSION_DATE "10/12/2024")#DD/MM/YYYY format
set(VERSION_DATE "20/012/2025")#DD/MM/YYYY format
set(OCPN_MIN_VERSION "ov58")

set(OCPN_API_VERSION_MAJOR "1")
set(OCPN_API_VERSION_MINOR "17")
set(OCPN_API_VERSION_MINOR "18")
set(TP_COMMENT " * Release using CI")

set(PARENT "opencpn")
Expand All @@ -77,10 +76,10 @@ set(PARENT "opencpn")
#Default is github.com. Now set in pluginconfigure.cmake
#set(GIT_REPOSITORY_SERVER "github.com")

# Specifies Cloudsmith upload repository suffix for each catalog
set(PROD "prod") # Standard Repos
set(BETA "beta") # Standard Repos
set(ALPHA "alpha") # Standard Repos
## Specifies Cloudsmith upload repository suffix for each catalog
set(PROD "prod") #Standard Repos
set(BETA "beta") #Standard Repos
set(ALPHA "alpha") #Standard Repos

# Set if Cloudsmith Base Repository name does not match your Git Repository name.
#set(CLOUDSMITH_BASE_REPOSITORY "${GIT_REPOSITORY_NAME}")
Expand All @@ -91,7 +90,9 @@ set (CLOUDSMITH_BASE_REPOSITORY "pypilot") #without the pi
set(CLOUDSMITH_USER "opencpn")
# set(CLOUDSMITH_USER "jon-gough")

set(XML_INFO_URL "https://opencpn-manuals.github.io/main/pypilot/index.html")
set(XML_INFO_URL
"https://opencpn-manuals.github.io/main/pypilot/index.html"
)
set(XML_SUMMARY ${SHORT_DESCRIPTION})
set(XML_DESCRIPTION ${LONG_DESCRIPTION})

Expand Down Expand Up @@ -122,8 +123,8 @@ set_property(
)
message(STATUS "${CMLOC}Build type: ${CMAKE_BUILD_TYPE}")

## ----- Statements below used to setup standard variables required by the CMAKE process --##
## -- Do not remove - ##
# ----- Statements below used to setup standard variables required by the CMAKE -##
# ----- process -- Do not remove -##

project(${PACKAGE})

Expand All @@ -142,7 +143,8 @@ set(CMAKE_VERBOSE_MAKEFILE "Activate verbose mode for make files" ON)

option(Plugin_CXX11 "Use c++11" OFF)

## --Below needed for build process.
## ----- Modify section above if there are special requirements for the plugin --##
## ----- Do not change next section - needed to configure build process ---------##
##===========================================================

include("PluginConfigure")
Expand Down Expand Up @@ -229,16 +231,16 @@ include_directories( ${PROJECT_SOURCE_DIR}/libs/wxservdisc/src )
##==============================================================

if (NOT OCPN_FLATPAK_CONFIG)
# Build environment not available when flatpak is being configured
# so following statements will not work
# Build environment not available when flatpak is being configured so
# following statements will not work
message(STATUS "${CMLOC}Adding target link libraries to ${PACKAGE_NAME}")

if (WIN32)
add_subdirectory(opencpn-libs/WindowsHeaders)
target_link_libraries(${PACKAGE_NAME} windows::headers)
endif (WIN32)

add_subdirectory(opencpn-libs/api-17)
add_subdirectory(opencpn-libs/api-18)
target_link_libraries(${PACKAGE_NAME} ocpn::api)

add_subdirectory(opencpn-libs/tinyxml)
Expand Down
4 changes: 2 additions & 2 deletions ci/circleci-build-flatpak.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ else
fi

if [ "$FLATPAK_BRANCH" = '' ]; then
cmake -DOCPN_TARGET=$OCPN_TARGET -DOCPN_FLATPAK_CONFIG=ON -DSDK_VER=$SDK_VER -DFLATPAK_BRANCH='beta' $SET_WX_VER ..
cmake -DOCPN_TARGET=$OCPN_TARGET -DBUILD_ARCH=$BUILD_ARCH -DOCPN_FLATPAK_CONFIG=ON -DSDK_VER=$SDK_VER -DFLATPAK_BRANCH='beta' $SET_WX_VER ..
else
cmake -DOCPN_TARGET=$OCPN_TARGET -DOCPN_FLATPAK_CONFIG=ON -DSDK_VER=$SDK_VER -DFLATPAK_BRANCH=$FLATPAK_BRANCH $SET_WX_VER ..
cmake -DOCPN_TARGET=$OCPN_TARGET -DBUILD_ARCH=$BUILD_ARCH -DOCPN_FLATPAK_CONFIG=ON -DSDK_VER=$SDK_VER -DFLATPAK_BRANCH=$FLATPAK_BRANCH $SET_WX_VER ..
fi

make flatpak-build
Expand Down
Loading