update nigiri: merge duplicates performance #2632
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Windows Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
release: | |
types: | |
- published | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: [ self-hosted, windows, x64 ] | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- mode: Debug | |
webui: Off | |
- mode: Release | |
webui: On | |
env: | |
CXX: cl.exe | |
CC: cl.exe | |
BUILDCACHE_COMPRESS: true | |
BUILDCACHE_DIRECT_MODE: true | |
BUILDCACHE_ACCURACY: SLOPPY # not suitable for coverage/debugging | |
BUILDCACHE_DIR: ${{ github.workspace }}/.buildcache | |
BUILDCACHE_LUA_PATH: ${{ github.workspace }}/tools | |
BUILDCACHE_MAX_CACHE_SIZE: 1073741824 | |
steps: | |
- uses: actions/checkout@v4 | |
# ==== RESTORE CACHE ==== | |
- name: Restore buildcache Cache | |
run: | | |
$buildcachePath = "${{ runner.tool_cache }}\${{ github.event.repository.name }}\buildcache-${{ matrix.config.mode }}" | |
New-Item -ItemType Directory -Force -Path $buildcachePath | |
New-Item -Path ${{ github.workspace }}/.buildcache -ItemType SymbolicLink -Value $buildcachePath | |
- name: Restore Dependencies Cache | |
run: | | |
$depsPath = "${{ runner.tool_cache }}\${{ github.event.repository.name }}\deps" | |
New-Item -ItemType Directory -Force -Path $depsPath | |
New-Item -Path ${{ github.workspace }}\deps\ -ItemType SymbolicLink -Value $depsPath | |
# ==== BUILD ==== | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Build | |
run: | | |
git config --global core.autocrlf input | |
cmake ` | |
-GNinja -S . -B build ` | |
-DCMAKE_BUILD_TYPE=${{ matrix.config.mode }} ` | |
-DMOTIS_DEBUG_SYMBOLS=OFF ` | |
-DMOTIS_AVX2=${{ matrix.config.webui }} ` | |
-DMOTIS_AVX=${{ matrix.config.webui }} ` | |
-DMOTIS_WITH_WEBUI=${{ matrix.config.webui }} | |
.\build\buildcache\bin\buildcache.exe -z | |
cmake --build build --target ` | |
motis ` | |
motis-test ` | |
motis-itest | |
$CompilerExitCode = $LastExitCode | |
.\build\buildcache\bin\buildcache.exe -s | |
exit $CompilerExitCode | |
# ==== TESTS ==== | |
- name: Run Test Mode | |
if: matrix.config.webui == 'Off' | |
run: > | |
.\build\motis.exe | |
--mode test | |
--import.paths schedule-x:base/loader/test_resources/hrd_schedules/single-ice | |
--nigiri.first_day 2015-10-04 | |
--nigiri.no_cache true | |
--modules nigiri | |
- name: Run Tests | |
if: matrix.config.webui == 'Off' | |
run: .\build\motis-test.exe | |
- name: Run Integration Tests | |
if: matrix.config.webui == 'Off' | |
run: .\build\motis-itest.exe | |
# ==== WEB INTERFACE ==== | |
- name: Compile Web Interface | |
if: matrix.config.webui == 'On' | |
run: | | |
cmake --build build --target motis-web-ui | |
rm -r ui/web/elm-stuff | |
rm -r ui/web/src | |
# ==== API DOCS ==== | |
- name: Install Protocol Tool Dependencies | |
if: matrix.config.mode == 'Release' | |
uses: pnpm/action-setup@v3 | |
with: | |
version: ^8.15.4 | |
run_install: | | |
- cwd: tools/protocol | |
- name: Run Protocol Tool | |
if: matrix.config.mode == 'Release' | |
run: pnpm start | |
working-directory: tools/protocol | |
# ==== DISTRIBUTION ==== | |
- name: Move Profiles | |
if: matrix.config.mode == 'Release' | |
run: | | |
Copy-Item .\deps\osrm-backend\profiles .\osrm-profiles -Recurse | |
Copy-Item .\deps\ppr\profiles .\ppr-profiles -Recurse | |
Copy-Item .\deps\tiles\profile .\tiles-profiles -Recurse | |
- name: Move Web UI | |
if: matrix.config.mode == 'Release' | |
run: | | |
mkdir web | |
Copy-Item .\ui\web\external_lib,.\ui\web\img,.\ui\web\js,.\ui\web\style .\web\ -Recurse | |
Copy-Item .\ui\web\*.html,.\ui\web\*.js,.\ui\web\*.ico .\web\ | |
Copy-Item .\ui\web\openapi .\web\ -Recurse | |
- name: Move API Docs | |
if: matrix.config.mode == 'Release' | |
run: | | |
Copy-Item .\docs\generated\openapi-3.1\openapi.yaml .\web\openapi\openapi.yaml | |
Copy-Item .\docs\generated\openapi-3.0\openapi.yaml .\web\openapi\openapi-3.0.yaml | |
- name: Create Distribution | |
if: matrix.config.mode == 'Release' | |
run: | | |
mkdir dist | |
mv .\build\motis.exe dist | |
mv .\osrm-profiles dist | |
mv .\ppr-profiles dist | |
mv .\tiles-profiles dist | |
mv .\web dist | |
cd dist | |
7z a motis-windows.zip * | |
mv motis-windows.zip .. | |
- name: Upload Distribution | |
if: matrix.config.mode == 'Release' | |
uses: actions/upload-artifact@v4 | |
with: | |
name: motis-windows | |
path: dist | |
# ==== RELEASE ==== | |
- name: Upload Release | |
if: github.event.action == 'published' && matrix.config.mode == 'Release' | |
uses: actions/upload-release-asset@v1.0.2 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ github.event.release.upload_url }} | |
asset_path: ./motis-windows.zip | |
asset_name: motis-windows.zip | |
asset_content_type: application/zip |