This commit is contained in:
Siarhei Fedartsou 2024-06-08 11:18:18 +02:00
parent 01996f3e6e
commit d6f42b4399

View File

@ -29,25 +29,8 @@ jobs:
continue-on-error: false continue-on-error: false
env: env:
BUILD_TYPE: Release BUILD_TYPE: Release
# CC: gcc
# CXX: g++
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
# - name: Install Ninja
# shell: cmd
# run: |
# choco install ninja -y
# refreshenv
# - name: Verify Ninja installation
# run: ninja --version
# - name: Enable Conan cache
# uses: actions/cache@v4
# with:
# path: ~/.conan
# key: v9-conan-windows-${{ github.sha }}
# restore-keys: |
# v9-conan-windows-
- run: pip install "conan<2.0.0" - run: pip install "conan<2.0.0"
- run: conan --version - run: conan --version
- run: cmake --version - run: cmake --version
@ -63,60 +46,42 @@ jobs:
echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV echo PUBLISH=$([[ "${GITHUB_REF:-}" == "refs/tags/v${PACKAGE_JSON_VERSION}" ]] && echo "On" || echo "Off") >> $GITHUB_ENV
- run: npm install --ignore-scripts - run: npm install --ignore-scripts
- run: npm link --ignore-scripts - run: npm link --ignore-scripts
# - uses: microsoft/setup-msbuild@v2
# - name: Set up Clang in PATH
# shell: bash
# run: |
# clang --version
# clang++ --version
# - name: Configure Conan to use Clang
# shell: bash
# run: |
# conan profile new default --detect || true
# conan profile update settings.compiler=clang default
- name: Build - name: Build
shell: bash shell: bash
run: | run: |
#.\scripts\ci\windows-build.bat
# make --version
# clang --version
mkdir build mkdir build
cd build cd build
cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON .. cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CONAN=ON -DENABLE_NODE_BINDINGS=ON ..
cmake --build . --config Release cmake --build . --config Release
cmake --build . --config Release --target tests
- name: Run tests # TODO: MSVC goes out of memory when building our tests
shell: bash # - name: Run tests
run: |
ls -R build
- name: Run tests
shell: bash
run: |
./build/unit_tests/Release/server-tests.exe
# .\scripts\ci\windows-build.bat
# - name: Run node tests
# shell: bash # shell: bash
# run: | # run: |
# ./lib/binding/osrm-datastore.exe test/data/ch/monaco.osrm # cd build
# node test/nodejs/index.js # cmake --build . --config Release --target tests
# - name: Build Node package # # TODO: run tests
# shell: bash - name: Run node tests
# run: ./scripts/ci/node_package.sh shell: bash
# - name: Publish Node package run: |
# if: ${{ env.PUBLISH == 'On' }} ./lib/binding/osrm-datastore.exe test/data/ch/monaco.osrm
# uses: ncipollo/release-action@v1 node test/nodejs/index.js
# with: - name: Build Node package
# allowUpdates: true shell: bash
# artifactErrorsFailBuild: true run: ./scripts/ci/node_package.sh
# artifacts: build/stage/**/*.tar.gz - name: Publish Node package
# omitBody: true if: ${{ env.PUBLISH == 'On' }}
# omitBodyDuringUpdate: true uses: ncipollo/release-action@v1
# omitName: true with:
# omitNameDuringUpdate: true allowUpdates: true
# replacesArtifacts: true artifactErrorsFailBuild: true
# token: ${{ secrets.GITHUB_TOKEN }} artifacts: build/stage/**/*.tar.gz
omitBody: true
omitBodyDuringUpdate: true
omitName: true
omitNameDuringUpdate: true
replacesArtifacts: true
token: ${{ secrets.GITHUB_TOKEN }}
format-taginfo-docs: format-taginfo-docs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04