Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
4874cd5
[projmgr] MVP prototype initial commit
brondani Oct 4, 2021
3208ad0
[projmgr] Draft of Software Design Document
brondani Oct 12, 2021
93e47d3
[projmgr] Update SDD draft
brondani Oct 18, 2021
a960813
Add YAML schemas
brondani Oct 21, 2021
ecfb9c2
[projmgr] Update YAML schemas proposal
brondani Oct 25, 2021
b0e99d3
[projmgr] Update clayer YAML schema proposal
brondani Oct 25, 2021
4e62268
Whitespaces is throwing parser off
emilhammarstedtst Oct 27, 2021
ff41a2b
Merge pull request #2 from emilhammarstedtst/mvp-prototype
brondani Oct 28, 2021
5edb618
Added Overview documentation
ReinhardKeil Nov 5, 2021
ce06da9
Added content to Project Manager Overview
ReinhardKeil Nov 8, 2021
40d2174
Added more content
ReinhardKeil Nov 8, 2021
46d51fe
More content to specification added.
ReinhardKeil Nov 9, 2021
a8ef10e
clearified some open issues.
ReinhardKeil Nov 9, 2021
43849f2
Incorporated feedback, fixed typos, added warning level and proposal …
ReinhardKeil Nov 12, 2021
c700cb2
Incorporated feedback, fixed typos, added warning level and proposal …
ReinhardKeil Nov 12, 2021
79fddaf
fixed table formatting
ReinhardKeil Nov 12, 2021
468658d
Reflected current status of the cproj tool in overview documentation
ReinhardKeil Nov 24, 2021
fc98ce9
[projmgr] Add binaries
brondani Dec 7, 2021
39251d4
Directory Structure added
ReinhardKeil Dec 13, 2021
9be8bfd
[projmgr] Update binaries
brondani Dec 13, 2021
1ba770d
Access Sequences added,
ReinhardKeil Dec 14, 2021
ac7d80e
[projmgr] Update binaries
brondani Dec 14, 2021
a91b581
Clarified `board:` and `device:` name
ReinhardKeil Dec 21, 2021
5268a36
Worked on Manual (still a lot of work ahead)
ReinhardKeil Jan 10, 2022
2442b89
Added section Proposals
ReinhardKeil Jan 11, 2022
1bbcced
Added: Example for Layer; Configuration File PLM added.
ReinhardKeil Jan 12, 2022
d550e61
Updated section Overall Structure
ReinhardKeil Jan 17, 2022
1d5a9ea
- Incorporated feedback.
ReinhardKeil Jan 24, 2022
38c1a54
fixed some typos
ReinhardKeil Jan 24, 2022
efafd85
Mostly typos fixed
ReinhardKeil Jan 25, 2022
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
262 changes: 262 additions & 0 deletions .github/workflows/projmgr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,262 @@
name: projmgr
on:
pull_request:
paths:
- '.github/workflows/projmgr.yml'
- 'CMakeLists.txt'
- 'libs/crossplatform/**'
- 'libs/rtefsutils/**'
- 'libs/xmlreader/**'
- 'libs/xmltree/**'
- 'libs/xmltreeslim/**'
- 'tools/projmgr/**'
release:
types: [published]

jobs:
build:
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/projmgr/')) }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
os: [ macos-10.15, ubuntu-20.04, windows-2019 ]
include:
- os: macos-10.15
target: darwin64
binary: projmgr
- os: ubuntu-20.04
target: linux64
binary: projmgr
- os: windows-2019
target: windows64
binary: projmgr.exe

steps:
- name: Install macos deps
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
brew install \
ninja \
python \
swig

- name: Install linux deps
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt-get install \
bc \
build-essential \
ninja-build \
python-dev \
swig

- name: Install windows deps
if: ${{ startsWith(matrix.os, 'windows') }}
run: choco install -y ninja python swig

- name: Checkout devtools
uses: actions/checkout@v2
with:
submodules: true

- name: Create build folders
run: |
mkdir build
mkdir buildswig

- name: Configure windows build for amd64
if: ${{ startsWith(matrix.os, 'windows') }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64

- uses: ammaraskar/gcc-problem-matcher@master
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu') }}
- uses: ammaraskar/msvc-problem-matcher@master
if: ${{ startsWith(matrix.os, 'windows') }}

- name: Build projmgr
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release ..
cmake --build . --target projmgr
working-directory: ./build

- name: Archive projmgr
uses: actions/upload-artifact@v2
with:
name: projmgr-${{ matrix.target }}
path: ./build/tools/projmgr/${{ matrix.target }}/Release/${{ matrix.binary }}
retention-days: 1
if-no-files-found: error

- name: Build projmgr swig libs
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DSWIG_LIBS=ON ..
cmake --build . --target projmgr --config Release
working-directory: ./buildswig

- name: Archive projmgr swig libs windows
if: ${{ startsWith(matrix.os, 'windows') }}
uses: actions/upload-artifact@v2
with:
name: projmgr-swig-${{ matrix.target }}
path: |
./buildswig/tools/projmgr/swig/projmgr.py
./buildswig/tools/projmgr/swig/_projmgr.pyd
retention-days: 1

- name: Archive projmgr swig libs macos ubuntu
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu') }}
uses: actions/upload-artifact@v2
with:
name: projmgr-swig-${{ matrix.target }}
path: |
./buildswig/tools/projmgr/swig/projmgr.py
./buildswig/tools/projmgr/swig/_projmgr.so
retention-days: 1

release:
if: ${{ github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/projmgr/') }}
needs: [ build, unittest ]
runs-on: ubuntu-20.04
timeout-minutes: 15

steps:
- name: Checkout devtools
uses: actions/checkout@v2

- name: Create distribution folders
run: |
mkdir -p tools/projmgr/distribution/bin tools/projmgr/distribution/lib tools/projmgr/distribution/doc
cp tools/projmgr/docs/LICENSE.txt tools/projmgr/distribution/
cp tools/projmgr/docs/README.md tools/projmgr/distribution/doc/

- name: Download projmgr linux
uses: actions/download-artifact@v2
with:
name: projmgr-linux64
path: tools/projmgr/distribution/bin/linux64/

- name: Download projmgr macos
uses: actions/download-artifact@v2
with:
name: projmgr-darwin64
path: tools/projmgr/distribution/bin/darwin64/

- name: Download projmgr windows
uses: actions/download-artifact@v2
with:
name: projmgr-windows64
path: tools/projmgr/distribution/bin/windows64/

- name: Download projmgr-swig linux
uses: actions/download-artifact@v2
with:
name: projmgr-swig-linux64
path: tools/projmgr/distribution/lib/linux64/

- name: Download projmgr-swig macos
uses: actions/download-artifact@v2
with:
name: projmgr-swig-darwin64
path: tools/projmgr/distribution/lib/darwin64/

- name: Download projmgr-swig windows
uses: actions/download-artifact@v2
with:
name: projmgr-swig-windows64
path: tools/projmgr/distribution/lib/windows64/

- name: Zip distribution folder
run: zip -r projmgr.zip *
working-directory: tools/projmgr/distribution

- name: Attach zip archive to release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: tools/projmgr/distribution/projmgr.zip
tag: ${{ github.ref }}
overwrite: true
asset_name: projmgr.zip

unittest:
if: ${{ github.event_name == 'pull_request' || (github.event_name == 'release' && startsWith(github.ref, 'refs/tags/tools/projmgr/')) }}
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
fail-fast: true
matrix:
os: [ macos-10.15, ubuntu-20.04, windows-2019 ]
include:
- os: macos-10.15
target: darwin64
- os: ubuntu-20.04
target: linux64
- os: windows-2019
target: windows64

steps:
- name: Install macos deps
if: ${{ startsWith(matrix.os, 'macos') }}
run: |
brew install \
ninja

- name: Install linux deps
if: ${{ startsWith(matrix.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt-get install \
bc \
build-essential \
ninja-build

- name: Install windows deps
if: ${{ startsWith(matrix.os, 'windows') }}
run: choco install -y ninja

- name: Checkout devtools
uses: actions/checkout@v2
with:
submodules: true

- name: Create build folder
run: mkdir build

- name: Configure windows build for amd64
if: ${{ startsWith(matrix.os, 'windows') }}
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64

- uses: ammaraskar/gcc-problem-matcher@master
if: ${{ startsWith(matrix.os, 'macos') || startsWith(matrix.os, 'ubuntu') }}
- uses: ammaraskar/msvc-problem-matcher@master
if: ${{ startsWith(matrix.os, 'windows') }}

- name: Build and run projmgr unit tests
run: |
cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug ..
cmake --build . --target ProjMgrUnitTests
ctest -C Debug -R ProjMgrUnitTests
working-directory: ./build

- name: Archive unit tests results
uses: actions/upload-artifact@v2
with:
name: unittest-${{ matrix.target }}
path: ./build/Testing/Temporary/LastTest.log
retention-days: 1
if-no-files-found: error
if: ${{ always() }}

- name: Publish projmgr unit test results
uses: mikepenz/action-junit-report@v2
with:
check_name: "projmgr unit tests [${{ matrix.target }}]"
report_paths: build/projmgr_unit_test_report.xml

1 change: 1 addition & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ repos:
(?x)^(
tools/buildmgr/test/testinput/|
tools/packgen/test/data/|
tools/projmgr/test/data/|
libs/crossplatform/include/win|
tools/buildmgr/cbuildgen/include/Resource.h|
libs/crossplatform/test/src/TestProg.cpp)
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ cmake_policy(SET CMP0091 NEW)

option(COVERAGE "Enable code coverage" OFF)
option(LIBS_ONLY "Build only libraries" OFF)
option(SWIG_LIBS "Build SWIG libraries" OFF)

if(LIBS_ONLY)
message("LIBS_ONLY is active. Build only libraries")
Expand Down Expand Up @@ -37,6 +38,10 @@ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall")
endif()

if(SWIG_LIBS)
message("SWIG_LIBS is active. Build SWIG libraries")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
endif(SWIG_LIBS)

if(COVERAGE)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
Expand Down Expand Up @@ -78,6 +83,7 @@ add_subdirectory(libs/xmltreeslim)
if(NOT LIBS_ONLY)
add_subdirectory(tools/buildmgr)
add_subdirectory(tools/packgen)
add_subdirectory(tools/projmgr)
endif()

# Google Test Framework
Expand Down
2 changes: 1 addition & 1 deletion tools/buildmgr/cbuild/include/CbuildLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class CbuildLayer {
* @param saveBackup if true save the original file with extension '.bak'
* @return true if xml file is written successfully, otherwise false
*/
bool WriteXmlFile(const std::string &file, XMLTree* tree, const bool saveBackup=false);
static bool WriteXmlFile(const std::string &file, XMLTree* tree, const bool saveBackup=false);

/**
* @brief initialize header (tool and timestamp) information
Expand Down
42 changes: 42 additions & 0 deletions tools/projmgr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.14)

include(DumpCMakeProjectVersion)
include(ProjectVersionFromGitTag)
get_version_from_git_tag("tools/projmgr/")

project(ProjMgr VERSION "${PROJECT_VERSION}")
dump_cmake_project_version()

configure_file(src/ProductInfo.h.in ProductInfo.h)

set_property(DIRECTORY PROPERTY VS_STARTUP_PROJECT projmgr)

# projmgr library
SET(PROJMGR_SOURCE_FILES ProjMgr.cpp ProjMgrKernel.cpp ProjMgrCallback.cpp)
SET(PROJMGR_HEADER_FILES ProjMgr.h ProjMgrKernel.h ProjMgrCallback.h)

list(TRANSFORM PROJMGR_SOURCE_FILES PREPEND src/)
list(TRANSFORM PROJMGR_HEADER_FILES PREPEND include/)

add_library(projmgrlib OBJECT ${PROJMGR_SOURCE_FILES} ${PROJMGR_HEADER_FILES})
target_link_libraries(projmgrlib PUBLIC CrossPlatform RteFsUtils RteUtils XmlTree XmlTreeSlim XmlReader RteModel cbuild cxxopts yaml-cpp)
target_include_directories(projmgrlib PRIVATE include ${PROJECT_BINARY_DIR})

if(SWIG_LIBS)
# projmgr swig
add_subdirectory(swig)
else()
# projmgr target
add_executable(projmgr src/ProjMgrMain.cpp include/ProjMgr.h)
if(MSVC)
target_link_options(projmgr PUBLIC "$<$<CONFIG:Debug>:/SAFESEH:NO>")
endif(MSVC)
set_property(TARGET projmgr PROPERTY
MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_link_libraries(projmgr projmgrlib)
target_include_directories(projmgr PRIVATE include)
endif()

# projmgr test
enable_testing()
add_subdirectory(test)
2 changes: 2 additions & 0 deletions tools/projmgr/bin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Temporary binaries can be found in the following release page:
https://github.com/brondani/devtools/releases/tag/tools%2Fprojmgr%2F0.9.0
Loading