Skip to content

Commit cc8c976

Browse files
authored
Build all versions in GitHub workflows (#37)
- Build all CGMES versions in github workflows - Update license and homepage in CIMppPackaging.cmake Once this has been merged, the github pages with documentation can be generated for all versions so that the links in the Readme no longer lead nowhere.
2 parents af50348 + 0262f50 commit cc8c976

File tree

7 files changed

+81
-98
lines changed

7 files changed

+81
-98
lines changed

.github/workflows/build-doc.yml

+24-20
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,38 @@
11
name: build-doc
22

3-
on: push
3+
on:
4+
push:
5+
workflow_call:
46

57
jobs:
6-
7-
build-doc-CGMES_2-4-15_27JAN2020:
8+
build-doc:
89
runs-on: ubuntu-latest
9-
env:
10-
USE_CIM_VERSION: CGMES_2.4.15_27JAN2020
10+
strategy:
11+
matrix:
12+
schema:
13+
- CGMES_2.4.13_18DEC2013
14+
- CGMES_2.4.15_16FEB2016
15+
- CGMES_2.4.15_27JAN2020
16+
- CGMES_3.0.0
1117
steps:
12-
- uses: actions/checkout@v3
13-
- name: Checkout submodules
14-
run: git submodule update --init --recursive
18+
- name: Checkout Repository
19+
uses: actions/checkout@v4
1520
- name: Install Doxygen
16-
run: sudo apt-get install doxygen
17-
shell: bash
21+
run: sudo apt-get install doxygen
22+
shell: bash
1823
- name: Install Graphviz
1924
run: sudo apt-get install graphviz
20-
shell: bash
25+
shell: bash
2126
- name: Create Build Environment
22-
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION}}
23-
27+
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}
2428
- name: Configure CMake and compile
2529
shell: bash
26-
working-directory: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION}}/
30+
working-directory: ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}/
2731
run: |
28-
cd ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION}}
29-
cmake ../.. -DUSE_CIM_VERSION=${{env.USE_CIM_VERSION}}
30-
make doc
31-
- uses: actions/upload-artifact@v3
32+
cmake ../.. -DUSE_CIM_VERSION=${{matrix.schema}}
33+
make -j4 doc
34+
- name: Upload Artifact
35+
uses: actions/upload-artifact@v4
3236
with:
33-
name: doc_${{env.USE_CIM_VERSION}}
34-
path: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION}}/doc/html
37+
name: doc_${{matrix.schema}}
38+
path: ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}/doc/html

.github/workflows/build-gh-pages.yml

+16-41
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,30 @@
1-
name: build-gh-pages
1+
name: Deploy github pages
22

33
on: workflow_dispatch
44

55
jobs:
6+
build-doc:
7+
uses: ./.github/workflows/build-doc.yml
68
build-gh-pages:
79
runs-on: ubuntu-latest
10+
needs: build-doc
811
env:
9-
USE_CIM_VERSION_2_4_15: CGMES_2.4.15_27JAN2020
10-
USE_CIM_VERSION_3_0_0: CGMES_3.0.0
12+
CIM_1: CGMES_2.4.13_18DEC2013
13+
CIM_2: CGMES_2.4.15_16FEB2016
14+
CIM_3: CGMES_2.4.15_27JAN2020
15+
CIM_4: CGMES_3.0.0
1116
steps:
12-
- uses: actions/checkout@v3
13-
- name: Checkout submodules
14-
run: git submodule update --init --recursive
15-
- name: Install Doxygen
16-
run: sudo apt-get install doxygen
17-
shell: bash
18-
- name: Install Graphviz
19-
run: sudo apt-get install graphviz
20-
shell: bash
21-
22-
- name: USE_CIM_VERSION_2_4_15 Create Build Environment
23-
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_2_4_15}}
24-
- name: USE_CIM_VERSION_2_4_15 Configure CMake and compile
25-
shell: bash
26-
working-directory: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_2_4_15}}/
27-
run: |
28-
cd ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_2_4_15}}
29-
cmake ../.. -DUSE_CIM_VERSION=${{env.USE_CIM_VERSION_2_4_15}}
30-
make doc
31-
- name: USE_CIM_VERSION_2_4_15 Copy
17+
- name: Download
18+
uses: actions/download-artifact@v4
19+
- name: Copy
3220
run: |
3321
mkdir -p ./copy_files/docs
34-
cp -r ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_2_4_15}}/doc/html ./copy_files/docs/${{env.USE_CIM_VERSION_2_4_15}}
35-
36-
- name: USE_CIM_VERSION_3_0_0 Create Build Environment
37-
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_3_0_0}}
38-
- name: USE_CIM_VERSION_3_0_0 Configure CMake and compile
39-
shell: bash
40-
working-directory: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_3_0_0}}/
41-
run: |
42-
cd ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_3_0_0}}
43-
cmake ../.. -DUSE_CIM_VERSION=${{env.USE_CIM_VERSION_3_0_0}}
44-
make doc
45-
- name: USE_CIM_VERSION_3_0_0 Copy
46-
run: |
47-
mkdir -p ./copy_files/docs
48-
cp -r ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION_3_0_0}}/doc/html ./copy_files/docs/${{env.USE_CIM_VERSION_3_0_0}}
49-
cp ./README.md ./copy_files/docs/README.md
50-
22+
cp -r ./doc_${{env.CIM_1}} ./copy_files/docs/${{env.CIM_1}}
23+
cp -r ./doc_${{env.CIM_2}} ./copy_files/docs/${{env.CIM_2}}
24+
cp -r ./doc_${{env.CIM_3}} ./copy_files/docs/${{env.CIM_3}}
25+
cp -r ./doc_${{env.CIM_4}} ./copy_files/docs/${{env.CIM_4}}
5126
- name: Deploy
52-
uses: peaceiris/actions-gh-pages@v3
27+
uses: peaceiris/actions-gh-pages@v4
5328
with:
5429
github_token: ${{ secrets.GITHUB_TOKEN }}
5530
publish_dir: ./copy_files

.github/workflows/build-src.yml

+13-18
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,23 @@ name: build-src
33
on: push
44

55
jobs:
6-
7-
build-src-CGMES_2-4-15_27JAN2020:
6+
build-src:
87
runs-on: ubuntu-latest
9-
env:
10-
USE_CIM_VERSION: CGMES_2.4.15_27JAN2020
8+
strategy:
9+
matrix:
10+
schema:
11+
- CGMES_2.4.13_18DEC2013
12+
- CGMES_2.4.15_16FEB2016
13+
- CGMES_2.4.15_27JAN2020
14+
- CGMES_3.0.0
1115
steps:
12-
- uses: actions/checkout@v3
13-
- name: Checkout submodules
14-
run: git submodule update --init --recursive
15-
- name: Install Doxygen
16-
run: sudo apt-get install doxygen
17-
shell: bash
18-
- name: Install Graphviz
19-
run: sudo apt-get install graphviz
20-
shell: bash
16+
- name: Checkout Repository
17+
uses: actions/checkout@v4
2118
- name: Create Build Environment
22-
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION}}
23-
19+
run: cmake -E make_directory ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}
2420
- name: Configure CMake and compile
2521
shell: bash
26-
working-directory: ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION}}/
22+
working-directory: ${{runner.workspace}}/libcimpp/build/${{matrix.schema}}/
2723
run: |
28-
cd ${{runner.workspace}}/libcimpp/build/${{env.USE_CIM_VERSION}}
29-
cmake ../.. -DUSE_CIM_VERSION=${{env.USE_CIM_VERSION}}
24+
cmake ../.. -DUSE_CIM_VERSION=${{matrix.schema}}
3025
make -j4

.github/workflows/release.yml

+20-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Package build workflow
1+
name: Release packages
22

33
on:
44
push:
@@ -9,33 +9,42 @@ jobs:
99
package:
1010
runs-on: ubuntu-latest
1111
name: A job to build the packages
12+
strategy:
13+
matrix:
14+
schema:
15+
- CGMES_2.4.13_18DEC2013
16+
- CGMES_2.4.15_16FEB2016
17+
- CGMES_2.4.15_27JAN2020
18+
- CGMES_3.0.0
1219
steps:
1320
- name: Checkout
14-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
1522
- name: Build
16-
id: build-it-now
1723
uses: ./package/
24+
env:
25+
USE_CIM_VERSION: ${{matrix.schema}}
1826
- name: UploadRPM
19-
uses: actions/upload-artifact@v3
27+
uses: actions/upload-artifact@v4
2028
with:
21-
name: rpm
29+
name: rpm_${{matrix.schema}}
2230
path: ${{ github.workspace }}/build/*.rpm
2331
- name: UploadDEB
24-
uses: actions/upload-artifact@v3
32+
uses: actions/upload-artifact@v4
2533
with:
26-
name: deb
34+
name: deb_${{matrix.schema}}
2735
path: ${{ github.workspace }}/build/*.deb
2836
release:
2937
needs: package
3038
runs-on: ubuntu-latest
3139
steps:
3240
- name: GetArtifact
33-
uses: actions/download-artifact@v3
41+
uses: actions/download-artifact@v4
3442
- name: Release
35-
uses: softprops/action-gh-release@v1
43+
uses: softprops/action-gh-release@v2
3644
with:
3745
files: |
38-
rpm/*
39-
deb/*
46+
*/*.rpm
47+
*/*.deb
48+
fail_on_unmatched_files: true
4049
env:
4150
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

cmake/CIMppPackaging.cmake

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(CPACK_PACKAGE_NAME "libcimpp${CIM_FOLDER}")
1+
set(CPACK_PACKAGE_NAME "libcimpp_${USE_CIM_VERSION}")
22
set(CPACK_PACKAGE_VENDOR "Institute for Automation of Complex Power Systems, RWTH Aachen University")
33
set(CPACK_PACKAGE_CONTACT "Lukas Razik <[email protected]>")
44
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "CIM++ is deserialiser library for C++ objects from XML/RDF documents based on CIM standards")
@@ -7,11 +7,11 @@ set(CPACK_PACKAGE_VERSION_MINOR ${libcimpp_MINOR_VERSION})
77
set(CPACK_PACKAGE_VERSION_PATCH ${libcimpp_PATCH_VERSION})
88

99
set(CPACK_DEBIAN_PACKAGE_SECTION "devel")
10-
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://www.fein-aachen.org/projects/cimpp/")
10+
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "https://github.com/sogno-platform/libcimpp")
1111
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE "amd64")
1212

13-
set(CPACK_RPM_PACKAGE_LICENSE "MPL 2.0")
14-
set(CPACK_RPM_PACKAGE_URL "http://www.fein-aachen.org/projects/cimpp/")
13+
set(CPACK_RPM_PACKAGE_LICENSE "Apache-2.0")
14+
set(CPACK_RPM_PACKAGE_URL "https://github.com/sogno-platform/libcimpp")
1515
set(CPACK_RPM_PACKAGE_GROUP "Development/Libraries")
1616

1717
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")

doc/Doxyfile.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ PROJECT_NAME = @CIM_NAME@
22
PROJECT_LOGO = doc/cimpp.svg
33

44
OUTPUT_DIRECTORY = @CMAKE_CURRENT_BINARY_DIR@
5-
INPUT = src @USE_CIM_VERSION@ README.md
6-
INCLUDE_PATH = src
5+
INPUT = src static @USE_CIM_VERSION@ README.md
6+
INCLUDE_PATH = src static
77

88
GENERATE_LATEX = NO
99
QUIET = YES

package/entrypoint.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/sh
22

33
cd /github/workspace
4-
rm -r build
4+
rm -rf build
55
mkdir build
66
cd build
7-
cmake -DBUILD_SHARED_LIBS=ON ..
7+
cmake -DUSE_CIM_VERSION=$USE_CIM_VERSION -DBUILD_SHARED_LIBS=ON ..
88
cpack

0 commit comments

Comments
 (0)