rust runtime and connectors: phase one #4
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
name: derive-typescript | |
on: | |
push: | |
branches: [master] | |
paths: [crates/derive-typescript/**] | |
pull_request: | |
branches: [master] | |
paths: [crates/derive-typescript/**] | |
jobs: | |
build-and-test: | |
#runs-on: ubuntu-2004-large | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
submodules: false | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: 1.72.0 | |
default: true | |
target: x86_64-unknown-linux-musl | |
- run: sudo apt install -y musl-tools | |
- name: Login to GitHub container registry | |
# if: ${{ github.ref == 'refs/heads/master' }} | |
if: ${{ github.ref == 'refs/heads/johnny/rust-connectors' }} | |
run: | | |
echo "${{ secrets.GITHUB_TOKEN }}" | \ | |
docker login --username ${{ github.actor }} --password-stdin ghcr.io | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: | | |
crates/derive-typescript | |
- name: build `derive-typescript` | |
run: cd crates/derive-typescript && cargo build --target x86_64-unknown-linux-musl --release | |
- name: test `derive-typescript` | |
run: cd crates/derive-typescript && cargo test --target x86_64-unknown-linux-musl --release | |
- name: package docker image | |
run: docker build -t ghcr.io/estuary/derive-typescript:dev crates/derive-typescript/ | |
- name: push docker image | |
# if: ${{ github.ref == 'refs/heads/master' }} | |
if: ${{ github.ref == 'refs/heads/johnny/rust-connectors' }} | |
run: docker push ghcr.io/estuary/derive-typescript:dev |