|
| 1 | +name: Windows Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + |
| 8 | +env: |
| 9 | + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
| 10 | + BUILD_TYPE: Release |
| 11 | + BOOST_TOOLSET: "msvc" |
| 12 | + BOOST_VERSION: "1.84.0" |
| 13 | + BOOST_PLATFORM_VERSION: "2022" |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + runs-on: windows-2022 |
| 18 | + |
| 19 | + steps: |
| 20 | + - name: Checkout code |
| 21 | + uses: actions/checkout@v2 |
| 22 | + |
| 23 | + - name: Install Boost |
| 24 | + uses: MarkusJx/install-boost@v2.4.5 |
| 25 | + id: install-boost |
| 26 | + with: |
| 27 | + # REQUIRED: Specify the required boost version |
| 28 | + # A list of supported versions can be found here: |
| 29 | + # https://github.com/MarkusJx/prebuilt-boost/blob/main/versions-manifest.json |
| 30 | + boost_version: ${{env.BOOST_VERSION}} |
| 31 | + # OPTIONAL: Specify a platform version |
| 32 | + platform_version: ${{env.BOOST_PLATFORM_VERSION}} |
| 33 | + # OPTIONAL: Specify a toolset |
| 34 | + toolset: ${{env.BOOST_TOOLSET}} |
| 35 | + # NOTE: If a boost version matching all requirements cannot be found, |
| 36 | + # this build step will fail |
| 37 | + |
| 38 | + - name: Get specific version CMake, v3.28.0 |
| 39 | + uses: lukka/get-cmake@v3.28.0 |
| 40 | + |
| 41 | + - name: Configure CMake |
| 42 | + env: |
| 43 | + BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }} |
| 44 | + run: cmake -Bbuild -A x64 |
| 45 | + |
| 46 | + - name: Build application |
| 47 | + run: cmake --build build --config ${{env.BUILD_TYPE}} |
| 48 | + |
| 49 | + - name: Run tests |
| 50 | + run: | |
| 51 | + cd build |
| 52 | + ctest -C Release --output-on-failure |
| 53 | +
|
| 54 | + - name: Publish artifacts |
| 55 | + uses: actions/upload-artifact@v2 |
| 56 | + with: |
| 57 | + name: Application |
| 58 | + path: build/src/parser/Release/Sql2CppHeader.exe |
0 commit comments