Add results-only
flag
#35
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
on: | |
release: | |
types: [created] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
compile_windows: | |
runs-on: ubuntu-latest | |
steps: | |
- run: curl https://get.wasmer.io -sSfL | sh | |
- uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- run: aws s3 sync s3://${{ secrets.S3_BUCKET_PUBLIC }}/lang-runners lang-runners | |
- name: Compile windows runners | |
run: | | |
source ~/.wasmer/wasmer.sh | |
for runner in lang-runners/*.wasm; do | |
wasmer compile --target x86_64-pc-windows-msvc --llvm "$runner" -o "${runner/.wasm/.wjit}" | |
rm "$runner" | |
done | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: windows-runners | |
path: lang-runners/ | |
build: | |
needs: compile_windows | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu | |
cargoargs: --features build-llvm | |
- os: macos | |
cargoargs: --features build-llvm | |
- os: windows | |
cargoargs: '' | |
steps: | |
- uses: actions/checkout@v2 | |
- id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/cache@v2 | |
with: | |
path: ~/.cargo | |
key: cargo-${{ matrix.os }}-${{ hashFiles('Cargo.lock') }} | |
- uses: actions/cache@v2 | |
with: | |
path: target | |
key: build-${{ matrix.os }} | |
- uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: us-east-1 | |
- run: git clone https://github.com/robot-rumble/logic ../logic | |
- run: aws s3 sync s3://${{ secrets.S3_BUCKET_PUBLIC }}/lang-runners ../logic/wasm-dist/lang-runners | |
- run: aws s3 sync s3://${{ secrets.S3_BUCKET_BUILD }}/cli-assets dist | |
- if: matrix.os == 'windows' | |
uses: actions/download-artifact@v2 | |
with: | |
name: windows-runners | |
path: compiled_runners | |
- if: matrix.os == 'windows' | |
run: echo "COMPILED_RUNNERS=compiled_runners" >>$GITHUB_ENV | |
shell: bash | |
- if: matrix.os == 'macos' | |
run: | | |
brew install llvm | |
echo "LLVM_SYS_110_PREFIX=$(brew --prefix llvm)" >> $GITHUB_ENV | |
- if: matrix.os == 'ubuntu' | |
run: sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)" | |
- run: cargo build --release --no-default-features ${{matrix.cargoargs}} | |
env: | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
- if: matrix.os == 'windows' | |
run: | | |
mkdir release | |
cp -Path target/release/rumblebot.exe -Destination release | |
cp -Path README.md -Destination release | |
- if: matrix.os == 'macos' || matrix.os == 'ubuntu' | |
run: | | |
mkdir release | |
cp target/release/rumblebot release | |
cp README.md release | |
- run: 7z a release.zip ./release/* | |
- uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: release.zip | |
asset_name: rumblebot-${{ matrix.os }}.zip | |
asset_content_type: application/zip |