Skip to content

Commit

Permalink
Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
gershnik committed May 3, 2021
1 parent 4473302 commit 58f3150
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 1 deletion.
58 changes: 58 additions & 0 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: CMake

on:
push:
paths-ignore:
- 'README.md'
- '.gitignore'
- 'LICENSE'
- 'doc/**'
- 'pkg/**'

env:
BUILD_TYPE: Release
NDK_VER: 21.3.6528147
NDK_ARCH: x86_64

jobs:
desktop:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]

steps:
- uses: actions/checkout@v2

- name: Create Build Environment
run: cmake -E make_directory ${{runner.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{runner.workspace}}/build
run: cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE=$BUILD_TYPE

- name: Build and Test
working-directory: ${{runner.workspace}}/build
shell: bash
run: cmake --build . --config $BUILD_TYPE --target run-test

android:
runs-on: macos-latest

steps:
- uses: actions/checkout@v2
- uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: ${{env.NDK_ARCH}}
target: google_apis
ndk: ${{env.NDK_VER}}
script: |
mkdir -p ${{runner.workspace}}/build
cd ${{runner.workspace}}/build
cmake $GITHUB_WORKSPACE/test -DCMAKE_BUILD_TYPE:STRING=$BUILD_TYPE -DCMAKE_TOOLCHAIN_FILE:FILEPATH=$ANDROID_SDK_ROOT/ndk/$NDK_VER/build/cmake/android.toolchain.cmake -DANDROID_ABI:STRING=$NDK_ARCH -DANDROID_PLATFORM:STRING=19 -DANDROID_STL:STRING=c++_static
cmake --build . --config $BUILD_TYPE --target run-test
2 changes: 1 addition & 1 deletion pkg/conan/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class SysStringConan(ConanFile):
license = "BSD 3-Clause License"
author = "Eugene Gershnik gershnik@hotmail.com"
url = "https://github.com/gershnik/sys_string"
description = "A pointer-sized, immutable, Unicode-first C++ string class that is optimized for interoperability with platform-native string types."
description = "C++ string class optimized for interoperability with platform-native string types."
topics = ("string class", "unicode")
settings = "cppstd", "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
Expand Down

0 comments on commit 58f3150

Please sign in to comment.