Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add Release Upload #6

Merged
merged 4 commits into from
Apr 16, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 27 additions & 12 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published

jobs:
formatting:
Expand All @@ -28,14 +31,14 @@ jobs:
mode: [Debug, Release]
lint: [Off, On]
exclude:
- mode: Release
cxx: clang-9-san
- mode: Release
lint: On
- cxx: gcc-9
lint: On
- cxx: clang-9-san
lint: On
- mode: Release
cxx: clang-9-san
- mode: Release
lint: On
- cxx: gcc-9
lint: On
- cxx: clang-9-san
lint: On
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_NOHASHDIR: true
Expand Down Expand Up @@ -70,7 +73,7 @@ jobs:
cmake --build build --target motis motis-test motis-itest path-prepare parking-prepare ppr-preprocess osrm-extract osrm-contract at-example motis-eval motis-intermodal-eval
ccache -s

- name: Run Test Mode
- name: Run Test Mode
run: |
./build/motis --mode test \
--dataset.path base/loader/test_resources/hrd_schedules/single-ice \
Expand Down Expand Up @@ -135,11 +138,23 @@ jobs:
mv build/deps/address-typeahead/at-example motis
mv build/deps/ppr/ppr-preprocess motis
mv deps/osrm-backend/profiles motis
tar cjf motis-${{ github.sha }}-linux.tar.bz2 motis
tar cjf motis-linux.tar.bz2 motis

- name: Upload Distribution
if: matrix.mode == 'Release' && matrix.cxx == 'gcc-9'
uses: actions/upload-artifact@v1
with:
name: motis-${{ github.sha }}-linux.tar.bz2
path: motis-${{ github.sha }}-linux.tar.bz2
name: motis-linux
path: motis-linux.tar.bz2

# ==== RELEASE ====
- name: Upload Release
if: github.event.action == 'published' && matrix.mode == 'Release' && matrix.cxx == 'gcc-9'
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-linux.tar.bz2
asset_name: motis-linux.tar.bz2
asset_content_type: application/x-tar
21 changes: 18 additions & 3 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [ master ]
pull_request:
branches: [ master ]
release:
types:
- published

jobs:
build:
Expand Down Expand Up @@ -67,7 +70,7 @@ jobs:
- name: Create Distribution
if: matrix.mode == 'Release'
run: >
7z a motis-${{ github.sha }}-windows.zip
7z a motis-windows.zip
.\build\motis.exe
.\build\path-prepare.exe
.\build\parking-prepare.exe
Expand All @@ -82,5 +85,17 @@ jobs:
if: matrix.mode == 'Release'
uses: actions/upload-artifact@v1
with:
name: motis-${{ github.sha }}-windows.zip
path: motis-${{ github.sha }}-windows.zip
name: motis-windows
path: motis-windows.zip

# ==== RELEASE ====
- name: Upload Release
if: github.event.action == 'published' && matrix.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
asset_content_type: application/zip