Skip to content

module: transfers (profilebased) #2280

module: transfers (profilebased)

module: transfers (profilebased) #2280

Workflow file for this run

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@v3
# ==== 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:base/loader/test_resources/hrd_schedules/single-ice
--dataset.begin 20151004
--dataset.write_serialized false
--nigiri.no_cache true
--exclude_modules address osrm parking path ppr tiles gbfs
- 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
- name: Install RSL Web Interface Dependencies
uses: pnpm/action-setup@v2
if: matrix.config.webui == 'On'
with:
version: ^8.6.12
run_install: |
- cwd: ./ui/rsl
- name: Compile RSL Web Interface
if: matrix.config.webui == 'On'
run: pnpm run build
working-directory: ./ui/rsl
# ==== API DOCS ====
- name: Install Protocol Tool Dependencies
if: matrix.config.mode == 'Release'
uses: pnpm/action-setup@v2
with:
version: ^8.6.12
run_install: |
- cwd: tools/protocol
- name: Run Protocol Tool
if: matrix.config.mode == 'Release'
run: pnpm start --skip rsl-ui
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
Copy-Item .\ui\rsl\dist .\web\rsl -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: >
7z a motis-windows${{ matrix.config.tag }}.zip
.\build\motis.exe
.\osrm-profiles
.\ppr-profiles
.\tiles-profiles
.\web
- name: Upload Distribution
if: matrix.config.mode == 'Release'
uses: actions/upload-artifact@v1
with:
name: motis-windows${{ matrix.config.tag }}
path: motis-windows${{ matrix.config.tag }}.zip
# ==== RELEASE ====
- name: Upload Release
if: github.event.action == 'published' && matrix.config.mode == 'Release'
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./motis-windows${{ matrix.config.tag }}.zip
asset_name: motis-windows${{ matrix.config.tag }}.zip
asset_content_type: application/zip