Skip to content

Update README.md

Update README.md #19

Workflow file for this run

# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml
name: CMake and CTest
on:
push:
branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
workflow_dispatch:
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build:
strategy:
matrix:
os:
- ubuntu-latest
#- macos-latest
- windows-latest
fail-fast: false
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: cache dependencies
uses: actions/cache@v4
id: cache
with:
path: |
~/.conan2/
~/.cache/pip/
%LocalAppData%\pip\Cache
key: ${{ runner.os }}-dependencies
- uses: actions/setup-python@v5
with:
python-version: "3"
- name: install conan
run: |
pip install conan
conan profile detect --force
- name: install conan packages
if: ${{ steps.cache.output.cache-hit != 'true' }}
run: conan install conanfile.txt --build=missing
- name: install CMake Ubuntu
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt install build-essential tree
pwd
- name: Build Ubuntu
if: matrix.os == 'ubuntu-latest'
# Build your program with the given configuration
run: |
cmake --version
cmake --preset conan-release
cmake --build ${{github.workspace}}/build/${{env.BUILD_TYPE}}/ --config ${{env.BUILD_TYPE}}
tree
- name: Build Windows
if: matrix.os == 'windows-latest'
# Build your program with the given configuration
run: |
cmake --version
cmake --preset conan-default
cmake --build ${{github.workspace}}/build/ --config ${{env.BUILD_TYPE}}
- uses: actions/upload-artifact@v4
with:
name: ${{matrix.os}}-binaries
path: |
build/Release/gcode2hpgl.exe
build/Release/hpgl2lpkf91s.exe
build/Release/gcode2hpgl
build/Release/hpgl2lpkf91s
- name: Test
working-directory: ${{github.workspace}}/build/${{env.BUILD_TYPE}}/
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}} --output-junit test_results.xml
- name: Test Summary
uses: test-summary/[email protected]
with:
paths: "build/${{env.BUILD_TYPE}}/test_results.xml"
if: always()