Skip to content

Commit

Permalink
add github action
Browse files Browse the repository at this point in the history
  • Loading branch information
injae committed Jul 11, 2021
1 parent 9d49f5b commit e3b485b
Show file tree
Hide file tree
Showing 3 changed files with 134 additions and 0 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Linux

on: [push]

jobs:
ubuntu-bionic-gcc-11:
runs-on: ubuntu-18.04
steps:
- name: Clone Repository
uses: actions/checkout@master
with:
submodules: true
- name: C++ Setting
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install -yq g++-11 gcc-11 libc++-dev libc++abi-dev build-essential libstdc++-11-dev
- name: Compiler Setting
run: |
echo "CC=gcc-11" >> $GITHUB_ENV
echo "CXX=g++-11" >> $GITHUB_ENV
- name: CMake build
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DUSE_CPPM_PATH=ON -DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON .
cd build && cmake --build . --config Release && cd Release
- name: Run Test Script
run: |
./serde_example
./serde_example1
./simple_example
ubuntu-bionic-llvm-8:
runs-on: ubuntu-18.04
steps:
- name: Clone Repository
uses: actions/checkout@master
with:
submodules: true
- name: C++ Setting
run: |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
sudo add-apt-repository -y "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-8 main"
sudo apt-get update
sudo apt-get install -yq clang-8 libc++-dev libc++abi-dev libstdc++-8-dev build-essential
- name: Compiler Setting
run: |
echo "CC=clang-8" >> $GITHUB_ENV
echo "CXX=clang++-8" >> $GITHUB_ENV
- name: CMake build
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=Release -DUSE_CPPM_PATH=ON -DSERDEPP_USE_NLOHMANN_JSON=ON -DSERDEPP_USE_TOML11=ON -DSERDEPP_USE_YAML-CPP=ON -DSERDEPP_BUILD_EXAMPLES=ON .
cd build && cmake --build . --config Release && cd Release
- name: Run Test Script
run: |
./serde_example
./serde_example1
./simple_example
51 changes: 51 additions & 0 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: MacOS

on: [push]

jobs:
macos-clang:
runs-on: macos-latest
strategy:
matrix:
build-type: ['Release', 'Debug']
cmake-option: ['-DUSE_CPPM_PAHT=ON', '-DSERDEPP_USE_NLOHMANN_JSON=ON', '-DSERDEPP_USE_TOML11=ON','-DSERDEPP_BUILD_EXAMPLES=ON']
steps:
- name: Clone Repository
uses: actions/checkout@master
with:
submodules: true
- name: C++ Setting
run: |
brew install llvm cmake
- name: Compiler Setting
run: |
echo "CC=/usr/local/opt/llvm/bin/clang" >> $GITHUB_ENV
echo "CXX=/usr/local/opt/llvm/bin/clang++" >> $GITHUB_ENV
- name: CMake build
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.build-type}} ${{matrix.cmake-option}} .
cd build && cmake --build . --config ${{matrix.build-type}}
cd ${{matrix.build-type}}
- name: Run Test Script
run: |
./serde_example
./serde_example1
./simple_example
# runs-on: macos-latest
# strategy:
# matrix:
# c-compiler: [gcc, clang]
# cxx-compiler: [g++, clang++]
# steps:
# - name: Clone Repository
# uses: actions/checkout@master
# - name: Compiler Setting
# run: echo Compiler Setting
# env:
# CC: ${{matrix.compiler}}
# - name: CMake build
# run: cmake -Bbuild . && cd build && cmake --build .
# - name: Cppm build install
# run: cd build && ./cppm build install
24 changes: 24 additions & 0 deletions .github/workflows/window.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Windows

on: [push]

jobs:
windows-msvc:
runs-on: windows-2019
strategy:
matrix:
build-type: ['Release', 'Debug']
steps:
- name: Clone Repository
uses: actions/checkout@master
with:
submodules: true
- name: CMake build
run: |
cmake -Bbuild -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DUSE_CPPM_PATH=ON .
cd build
cmake --build . --config ${{matrix.build-type}} --target install --target cppm_link
- name: Cppm build install
run: |
cd build/${{matrix.build-type}}
./cppm build -h

0 comments on commit e3b485b

Please sign in to comment.