Skip to content

Commit

Permalink
Add Release Upload (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixguendling committed Apr 16, 2020
1 parent 4a8f7f2 commit 73d2554
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 15 deletions.
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.zip
asset_content_type: application/zip

0 comments on commit 73d2554

Please # to comment.