You can not select more than 25 topics
Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- name: Release
-
- permissions:
- contents: write
-
- on:
- release:
- types:
- - "published"
-
- jobs:
- release:
- name: "Release"
-
- strategy:
- matrix:
- platform: [ubuntu-latest, macos-latest, windows-latest]
- python-version: ["3.7"]
- fail-fast: false
- runs-on: ${{ matrix.platform }}
-
- steps:
- - uses: actions/checkout@v3
-
- - name: Install Cap'n Proto and libacl-dev (Linux)
- if: runner.os == 'Linux'
- run: |
- export DEBIAN_FRONTEND=noninteractive
- sudo apt-get install -y capnproto libcapnp-dev libacl1-dev
- - name: Install Cap'n Proto (macOS)
- if: runner.os == 'macOS'
- run: brew install capnp
- env:
- HOMEBREW_NO_AUTO_UPDATE: 1
- HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK: 1
- HOMEBREW_NO_INSTALL_CLEANUP: 1
- - name: Install Cap'n Proto (Windows)
- if: runner.os == 'Windows'
- shell: pwsh
- run: |
- choco install capnproto
- echo "$Env:Programfiles\capnproto" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
-
- - uses: r7kamura/rust-problem-matchers@v1.1.0
-
- - name: "Build binaries"
- timeout-minutes: 30
- run: cargo build --release -p dora-runtime -p dora-coordinator -p dora-cli
-
- - name: "Create Archive (Unix)"
- if: runner.os == 'Linux' || runner.os == 'macOS'
- run: |
- mkdir archive
- cp target/release/dora-runtime archive
- cp target/release/dora-coordinator archive
- cp target/release/dora-cli archive/dora
- mkdir archive/iceoryx
- find target -type f -wholename "*/iceoryx-install/bin/iox-roudi" -exec cp {} archive/iceoryx \;
- find target -type f -wholename "*/iceoryx-install/share/doc/iceoryx_posh/LICENSE" -exec cp {} archive/iceoryx \;
- cd archive
- zip -r ../archive.zip .
- cd ..
-
- - name: Create Archive (Windows)
- if: runner.os == 'Windows'
- shell: powershell
- run: |
- New-Item -Path archive -ItemType Directory
- Copy-Item target/release/dora-runtime.exe -Destination archive
- Copy-Item target/release/dora-coordinator.exe -Destination archive
- Copy-Item target/release/dora-cli.exe -Destination archive/dora.exe
- Compress-Archive -Path archive\* -DestinationPath archive.zip
-
- - name: "Upload release asset"
- uses: actions/upload-release-asset@v1.0.1
- env:
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- with:
- upload_url: ${{ github.event.release.upload_url }}
- asset_path: archive.zip
- asset_name: dora-${{ github.ref_name }}-x86_64-${{ runner.os }}.zip
- asset_content_type: application/zip
|