v0.1-alpha.31 #56
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 }} | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
cargoargs: --features build-llvm | |
# - os: macos-12 | |
# cargoargs: --features build-llvm | |
# - os: windows-latest | |
# cargoargs: '' | |
steps: | |
- uses: actions/checkout@v2 | |
- id: get_release | |
uses: bruceadams/get-release@v1.2.0 | |
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-latest' | |
uses: actions/download-artifact@v2 | |
with: | |
name: windows-runners | |
path: compiled_runners | |
- if: matrix.os == 'windows-latest' | |
run: echo "COMPILED_RUNNERS=compiled_runners" >> $GITHUB_ENV | |
shell: bash | |
- if: matrix.os == 'macos-12' | |
run: | | |
wget https://github.com/macports/macports-base/releases/download/v2.7.1/MacPorts-2.7.1-12-Monterey.pkg | |
sudo installer -pkg ./MacPorts-2.7.1-12-Monterey.pkg -target / | |
sudo /opt/local/bin/port install llvm-10 | |
echo "LLVM_SYS_110_PREFIX=/opt/local/libexec/llvm-10" >> $GITHUB_ENV | |
- if: matrix.os == 'ubuntu-20.04' | |
run: | | |
wget "https://mirrors.kernel.org/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb" | |
sudo apt install ./libffi6_3.2.1-8_amd64.deb | |
wget --no-check-certificate -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' | |
sudo apt update | |
sudo apt install llvm | |
sudo apt-get install llvm-10 llvm-10-dev libllvm10 llvm-10-runtime | |
- run: cargo build --release --no-default-features ${{matrix.cargoargs}} | |
env: | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
- if: matrix.os == 'windows-latest' | |
run: | | |
mkdir release | |
cp -Path target/release/rumblebot.exe -Destination release | |
cp -Path README.md -Destination release | |
- if: matrix.os == 'macos-12' || matrix.os == 'ubuntu-20.04' | |
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 |