Jm/ext ts guest new #32
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
name: Typescript Builder | |
on: | |
pull_request: | |
paths: | |
- "compile/typescript/builder/**" | |
jobs: | |
interpreter: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
run: | | |
rustup toolchain install stable --profile minimal --no-self-update | |
rustup default stable | |
rustup target add wasm32-wasi | |
shell: bash | |
- name: Make interpreter | |
working-directory: compile/typescript/builder | |
run: make interpreter | |
- name: Upload js_interpreter.wasm to artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: interpreter | |
path: compile/typescript/builder/interpreter/target/wasm32-wasi/release/js_interpreter.wasm | |
builder: | |
name: builder-${{ matrix.name }} | |
needs: interpreter | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- name: x86_64-unknown-linux-gnu | |
os: ubuntu-20.04 | |
output: js_builder-x86_64-unknown-linux-gnu | |
- name: aarch64-unknown-linux-gnu | |
os: ubuntu-20.04 | |
output: js_builder-aarch64-unknown-linux-gnu | |
- name: x86_64-apple-darwin | |
os: macos-latest | |
output: js_builder-x86_64-apple-darwin | |
- name: aarch64-apple-darwin | |
os: macos-latest | |
output: js_builder-aarch64-apple-darwin | |
- name: x86_64-pc-windows-msvc | |
os: windows-latest | |
output: js_builder-x86_64-pc-windows-msvc.exe | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: ${{ github.event.pull_request.head.repo.full_name }} | |
ref: ${{ github.event.pull_request.head.ref }} | |
- name: Set up Rust | |
run: | | |
rustup toolchain install stable --profile minimal --no-self-update | |
rustup default stable | |
rustup target add ${{ matrix.name }} | |
shell: bash | |
- name: Update APT Sources | |
run: sudo apt-get update | |
if: matrix.name == 'aarch64-unknown-linux-gnu' | |
- name: Install ARM GCC toolchain | |
run: sudo apt-get --assume-yes install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
if: matrix.name == 'aarch64-unknown-linux-gnu' | |
- uses: actions/download-artifact@v3 | |
with: | |
name: interpreter | |
path: compile/typescript/builder/interpreter/target/wasm32-wasi/release/ | |
- name: Build CLI ${{ matrix.name }} | |
working-directory: compile/typescript/builder | |
run: make builder-${{ matrix.name }} | |
env: | |
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | |
- name: Commit CLI ${{ matrix.name }} Binary | |
uses: EndBug/add-and-commit@v9 | |
with: | |
default_author: github_actions | |
commit: "--signoff" | |
message: "Add: js_builder-${{ matrix.name }}" | |
add: compile/typescript/builder/${{ matrix.output }} | |
pull: "--rebase --autostash" |