Michele Caini před 6 roky
rodič
revize
84d468333a
4 změnil soubory, kde provedl 114 přidání a 13 odebrání
  1. 106 0
      .github/workflows/main.yml
  2. 0 13
      .travis.yml
  3. 2 0
      CMakeLists.txt
  4. 6 0
      TODO

+ 106 - 0
.github/workflows/main.yml

@@ -0,0 +1,106 @@
+name: CI
+
+on: [push, pull_request]
+
+jobs:
+
+  linux:
+    timeout-minutes: 5
+
+    strategy:
+      matrix:
+        os: [ubuntu-18.04]
+        compiler: [g++, clang++]
+
+    runs-on: ${{ matrix.os }}
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Compile tests
+      working-directory: build
+      env:
+        CXX: ${{ matrix.compiler }}
+      run: |
+        cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON ..
+        make -j4
+    - name: Run tests
+      working-directory: build
+      env:
+        CTEST_OUTPUT_ON_FAILURE: 1
+      run: ctest --timeout 5 -C Debug -j4
+
+  coveralls:
+    timeout-minutes: 5
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Compile tests
+      working-directory: build
+      env:
+        CXXFLAGS: "-O0 --coverage -fno-inline -fno-inline-small-functions -fno-default-inline"
+        CXX: g++
+      run: |
+        cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON ..
+        make -j4
+    - name: Run tests
+      working-directory: build
+      env:
+        CTEST_OUTPUT_ON_FAILURE: 1
+      run: ctest --timeout 5 -C Debug -j4
+    - name: Setup Python
+      uses: actions/setup-python@master
+      with:
+        version: 3.7
+    - name: Update coveralls
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
+      run: |
+        pip install --upgrade wheel
+        pip install cpp-coveralls
+        coveralls --gcov gcov-7 --gcov-options '\-lp' -r . -b ./build -x cpp -x hpp -e ./deps -i ./src
+
+  windows:
+    timeout-minutes: 5
+
+    strategy:
+      matrix:
+        os: [windows-2019, windows-2016]
+        include:
+          - os: windows-2019
+            generator: Visual Studio 16 2019
+          - os: windows-2016
+            generator: Visual Studio 15 2017
+
+    runs-on: ${{ matrix.os }}
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Compile tests
+      working-directory: build
+      run: |
+        cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON -DCMAKE_CXX_FLAGS=/W1 -G"${{ matrix.generator }}" ..
+        cmake --build . -j 4
+    - name: Run tests
+      working-directory: build
+      env:
+        CTEST_OUTPUT_ON_FAILURE: 1
+      run: ctest --timeout 5 -C Debug -j4
+
+  macos:
+    timeout-minutes: 5
+    runs-on: macOS-10.14
+
+    steps:
+    - uses: actions/checkout@v1
+    - name: Compile tests
+      working-directory: build
+      run: |
+        cmake -DBUILD_TESTING=ON -DBUILD_LIB=ON ..
+        make -j4
+    - name: Run tests
+      working-directory: build
+      env:
+        CTEST_OUTPUT_ON_FAILURE: 1
+      run: ctest --timeout 5 -C Debug -j4

+ 0 - 13
.travis.yml

@@ -54,19 +54,6 @@ matrix:
     osx_image: xcode10
     compiler: clang
     env: COMPILER=clang++
-  - os: linux
-    compiler: gcc
-    addons:
-      apt:
-        sources: ['ubuntu-toolchain-r-test']
-        packages: ['g++-7']
-    env:
-      - COMPILER=g++-7
-      - CXXFLAGS="-O0 --coverage -fno-inline -fno-inline-small-functions -fno-default-inline"
-    before_script:
-      - pip install --user cpp-coveralls
-    after_success:
-      - coveralls --gcov gcov-7 --gcov-options '\-lp' --root ${TRAVIS_BUILD_DIR} --build-root ${TRAVIS_BUILD_DIR}/build --extension cpp --extension hpp --exclude deps --include src
   # Conan testing and uploading
   - <<: *conan-linux
     env: CONAN_GCC_VERSIONS=8 CONAN_DOCKER_IMAGE=conanio/gcc8

+ 2 - 0
CMakeLists.txt

@@ -222,6 +222,8 @@ endif()
 add_custom_target(
     entt_aob
     SOURCES
+        .github/workflows/main.yml
+        .github/FUNDING.yml
         appveyor.yml
         AUTHORS
         CONTRIBUTING.md

+ 6 - 0
TODO

@@ -33,3 +33,9 @@ TODO
 * multi component registry::remove and some others?
 * range based registry::remove and some others?
 * nested groups: AB/ABC/ABCD/... (hints: sort, check functions)
+
+* GH actions:
+  - badge(s) from github actions
+  - deploy doc (github pages) on tags
+  - rebuild single file somehow, somewhere
+  - conan on tags