Skip to content

Commit

Permalink
fix branch
Browse files Browse the repository at this point in the history
  • Loading branch information
iontodirel committed Jun 1, 2023
1 parent a414f21 commit 5cec04d
Show file tree
Hide file tree
Showing 12 changed files with 778 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CMake

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release

jobs:
build:
# 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

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
build_type: [Release, Debug]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3

- name: Install dependencies
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
chmod +x ${{github.workspace}}/install_dependencies.sh
sudo ${{github.workspace}}/install_dependencies.sh
- name: Configure
working-directory: ${{github.workspace}}/tests
# 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
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}

- name: Build
working-directory: ${{github.workspace}}/tests
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{ matrix.build_type }}

- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{ matrix.build_type }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build/*
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
# position-lib
Header only position representation, conversion and formatting
# position-lib
2 changes: 2 additions & 0 deletions install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/sh
apt-get install -y gcc g++ make cmake ninja-build
Loading

0 comments on commit 5cec04d

Please sign in to comment.