| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,50 @@ | |||
| 1 | + name: CMake | ||
| 2 | + | ||
| 3 | + on: [push] | ||
| 4 | + | ||
| 5 | + env: | ||
| 6 | + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) | ||
| 7 | + BUILD_TYPE: RelWithDebInfo | ||
| 8 | + | ||
| 9 | + jobs: | ||
| 10 | + build: | ||
| 11 | + | ||
| 12 | + runs-on: ${{ matrix.os }} | ||
| 13 | + strategy: | ||
| 14 | + matrix: | ||
| 15 | + os: [windows-latest, ubuntu-latest, macOS-latest] | ||
| 16 | + | ||
| 17 | + steps: | ||
| 18 | + - uses: actions/checkout@v1 | ||
| 19 | + | ||
| 20 | + - name: Install conan package manager | ||
| 21 | + run: pip install conan | ||
| 22 | + | ||
| 23 | + - name: Create Build Environment | ||
| 24 | + # Some projects don't allow in-source building, so create a separate build directory | ||
| 25 | + # We'll use this as our working directory for all subsequent commands | ||
| 26 | + run: cmake -E make_directory ${{runner.workspace}}/build | ||
| 27 | + | ||
| 28 | + - name: Configure CMake | ||
| 29 | + # Use a bash shell so we can use the same syntax for environment variable | ||
| 30 | + # access regardless of the host operating system | ||
| 31 | + shell: bash | ||
| 32 | + working-directory: ${{runner.workspace}}/build | ||
| 33 | + # Note the current convention is to use the -S and -B options here to specify source | ||
| 34 | + # and build directories, but this is only available with CMake 3.13 and higher. | ||
| 35 | + # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 | ||
| 36 | + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DEXPRESSCPP_USE_CONAN_DEPENDENCIES=ON | ||
| 37 | + | ||
| 38 | + - name: Build | ||
| 39 | + working-directory: ${{runner.workspace}}/build | ||
| 40 | + shell: bash | ||
| 41 | + # Execute the build. You can specify a specific target with "--target <NAME>" | ||
| 42 | + run: cmake --build . --config $BUILD_TYPE | ||
| 43 | + | ||
| 44 | + # TODO: add tests to the pipeline | ||
| 45 | + # - name: Test | ||
| 46 | + # working-directory: ${{runner.workspace}}/build | ||
| 47 | + # shell: bash | ||
| 48 | + # # Execute tests defined by the CMake configuration. | ||
| 49 | + # # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail | ||
| 50 | + # run: make tests && ./tests | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -82,6 +82,24 @@ deploy-latest-docker-ci_gcc8: | |||
| 82 | 82 | - ${CI_PROJECT_DIR}/build/ | |
| 83 | 83 | expire_in: 10 hrs | |
| 84 | 84 | ||
| 85 | + | ||
| 86 | + .build:windows: | ||
| 87 | + stage: build | ||
| 88 | + script: | ||
| 89 | + - pip install conan --upgrade | ||
| 90 | + - mkdir -p build | ||
| 91 | + - cd build | ||
| 92 | + - cmake .. -DEXPRESSCPP_USE_CONAN_DEPENDENCIES=ON | ||
| 93 | + - cmake --build . -j4 | ||
| 94 | + tags: | ||
| 95 | + - windows | ||
| 96 | + allow_failure: true | ||
| 97 | + | ||
| 98 | + build:windows:gcc8: | ||
| 99 | + extends: .build:windows | ||
| 100 | + before_script: | ||
| 101 | + - echo "start job on windows" | ||
| 102 | + | ||
| 85 | 103 | build:linux:gcc8: | |
| 86 | 104 | extends: .build:linux | |
| 87 | 105 | image: registry.gitlab.com/expresscpp/expresscpp/ci_gcc8:latest | |
| Back | FazBrowse Home | New Git URL |
0 commit comments