Skip to content

update interpreter

update interpreter #38

Workflow file for this run

name: Rust
on:
push:
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
./target
key: test-cargo-registry
- name: Run tests
run: cargo test --verbose
build:
strategy:
fail-fast: false
matrix:
include:
- TARGET: x86_64-unknown-linux-gnu
OS: ubuntu-latest
- TARGET: x86_64-apple-darwin # is not properly signed so there are security warnings
OS: macos-latest
needs: test
runs-on: ${{ matrix.OS }}
env:
NAME: lem
TARGET: ${{ matrix.TARGET }}
OS: ${{ matrix.OS }}
steps:
- uses: actions/checkout@v2
- name: Cargo cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
./target
key: lem-${{matrix.TARGET}}
- name: List
run: find ./
- name: Install and configure dependencies
run: |
# dependencies are only needed on ubuntu as that's the only place where
# we make cross-compilation
# if [[ $OS =~ ^ubuntu.*$ ]]; then
# sudo apt-get install -qq crossbuild-essential-arm64 crossbuild-essential-armhf
# fi
# some additional configuration for cross-compilation on linux
# cat >>~/.cargo/config <<EOF
# [target.aarch64-unknown-linux-gnu]
# linker = "aarch64-linux-gnu-gcc"
# EOF
- name: Install rust target
run: rustup target add $TARGET
- name: Run build
run: cargo build --release --target $TARGET
- name: List target
run: find ./target
- name: Compress
run: |
mkdir -p ./artifacts
if [[ $GITHUB_REF_TYPE =~ ^tag$ ]]; then
TAG=$GITHUB_REF_NAME
else
TAG=$GITHUB_SHA
fi
mv ./target/$TARGET/release/$NAME ./$NAME
tar -czf ./artifacts/$NAME-$TARGET-$TAG.tar.gz $NAME
- name: Archive artifact
uses: actions/upload-artifact@v2
with:
name: result
path: |
./artifacts
# deploys to github releases on tag
deploy:
if: startsWith(github.ref, 'refs/tags/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v2
with:
name: result
path: ./artifacts
- name: List
run: find ./artifacts
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./artifacts/*.tar.gz