Skip to content

Commit

Permalink
Merge pull request #10 from cascade-gmbh/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
volkerdoerr authored Jan 18, 2023
2 parents 8b80d63 + 13e0052 commit 4f8cd68
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 17 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/build-and-deploy-executables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,27 @@ jobs:

env:
CMAKE_BUILD_TYPE: "${{ matrix.build_type }}"
TARGET_SPEC: ${{ matrix.os }}-${{ matrix.build_type }}

defaults:
run:
shell: bash

steps:

- uses: actions/checkout@v3

- run: ./build.sh

- run: |
if test -f "cocor.exe"; then
mv cocor.exe ./cocor.${{ matrix.os }}-${{ matrix.build_type }}.exe
else
mv cocor ./cocor.${{ matrix.os }}-${{ matrix.build_type }}
fi
- uses: actions/upload-artifact@v3
with:
name: cocor-artifacts
name: cocor-executables
path: cocor.${{ matrix.os }}-${{ matrix.build_type }}*
if-no-files-found: error

Expand All @@ -40,7 +49,7 @@ jobs:
steps:
- uses: actions/download-artifact@v3
with:
name: cocor-artifacts
name: cocor-executables
- uses: ncipollo/release-action@v1
with:
tag: "v1.0.0"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
[![](https://github.com/cascade-gmbh/cocor/actions/workflows/build-and-deploy-executables.yml/badge.svg)](.github/workflows/build-and-deploy-executables.yml)

Fork from [CocoR-CPP](https://github.com/mingodad/CocoR-CPP).
Executables used by [Cascade Public Monorepo](https://github.com/cascade-gmbh/cascade-public-monorepo).
Executables used by [Cascade Public Monorepo](https://github.com/cascade-gmbh/cascade-public-monorepo).
Compiler: clang on macOS, gcc on Ubuntu, msvc on Windows.

## Deployed executables

Expand Down
24 changes: 11 additions & 13 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,24 @@
# set current directory to script source directory:
cd $(dirname $0)

# ensure environment:
if [[ -z "${CMAKE_BUILD_TYPE}" ]]; then
CMAKE_BUILD_TYPE="Debug"
fi

echo ------------------------------------------------------- build-cocor

# invoke cmake
echo CMAKE:
cmake .
cmake --build . --config $CMAKE_BUILD_TYPE

# copy build result
echo EXECUTABLE:
if test -f "cocor"; then
cp ./cocor ./cocor.$TARGET_SPEC
elif test -f "Debug/cocor.exe"; then
cp ./Debug/cocor.exe ./cocor.$TARGET_SPEC.exe
if test -f "Debug/cocor.exe"; then
cp ./Debug/cocor.exe ./cocor.exe

elif test -f "Release/cocor.exe"; then
cp ./Release/cocor.exe ./cocor.$TARGET_SPEC.exe
cp ./Release/cocor.exe ./cocor.exe

fi
ls cocor.$TARGET_SPEC*

# simple test
echo COCOR TEST-CALL WITHOUT PARAMETERS:
./cocor.$TARGET_SPEC

./cocor

0 comments on commit 4f8cd68

Please sign in to comment.