Skip to content

chore(deps): update react monorepo #357

chore(deps): update react monorepo

chore(deps): update react monorepo #357

Workflow file for this run

name: Build and test
on:
push:
branches: [main]
tags-ignore:
- '**'
pull_request:
env:
MACOSX_DEPLOYMENT_TARGET: '10.15'
jobs:
build:
strategy:
fail-fast: false
matrix:
settings:
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/brooooooklyn/jsc-rs/linux-builder:x64
- os: ubuntu-latest
target: aarch64-unknown-linux-gnu
docker: ghcr.io/brooooooklyn/jsc-rs/linux-builder:aarch64
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
docker: ghcr.io/brooooooklyn/jsc-rs/linux-builder:x64-musl
- os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.settings.os }}
name: Build ${{ matrix.settings.target }}
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.os.target }}
toolchain: stable
if: ${{ !matrix.settings.docker }}
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
.cargo-cache/
target
key: ${{ matrix.settings.target }}-cargo-cache
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
if: matrix.settings.os == 'macos-latest'
- name: Download static release
run: |
cargo xtask download --target ${{ matrix.settings.target }}
ls -R WebKit
ls -R icu
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build JavaScriptCore
if: matrix.settings.os == 'macos-latest'
run: |
cargo build --bin tyr --release
cp target/release/tyr ./tyr-bin
- name: Build JavaScriptCore
if: matrix.settings.os == 'windows-latest'
run: |
cargo build --bin tyr --release
cp target/release/tyr.exe ./tyr-bin.exe
- name: Build JavaScriptCore in docker
uses: addnab/docker-run-action@v3
if: ${{ matrix.settings.docker }}
with:
image: ${{ matrix.settings.docker }}
options: '--user 0:0 -e GITHUB_TOKEN -v ${{ github.workspace }}/.cargo-cache/registry/index:/usr/local/cargo/registry/index -v ${{ github.workspace }}/.cargo-cache/registry/cache:/usr/local/cargo/cache -v ${{ github.workspace }}/.cargo-cache/git/db:/usr/local/cargo/git/db -v ${{ github.workspace }}:/build -w /build'
run: >-
export CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=clang &&
rustup toolchain install $(cat ./rust-toolchain) &&
rustup target add ${{ matrix.settings.target }} &&
cargo build --bin tyr --target ${{ matrix.settings.target }} --release &&
cp target/${{ matrix.settings.target }}/release/tyr ./tyr-bin
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bin-${{ matrix.settings.target }}
path: tyr-bin
if-no-files-found: error
if: matrix.settings.os != 'windows-latest'
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bin-${{ matrix.settings.target }}
path: tyr-bin.exe
if-no-files-found: error
if: matrix.settings.os == 'windows-latest'
tests:
runs-on: ${{ matrix.settings.os }}
name: Test ${{ matrix.settings.target }}
needs:
- build
strategy:
fail-fast: false
matrix:
settings:
- os: macos-latest
target: x86_64-apple-darwin
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v3
- name: Download binary
uses: actions/download-artifact@v3
with:
name: bin-${{ matrix.settings.target }}
- name: Run tests
if: matrix.settings.os != 'windows-latest'
run: |
chmod 777 tyr-bin
./tyr-bin specs/console.js
- name: Run tests
if: matrix.settings.os == 'windows-latest'
run: |
icacls tyr-bin.exe
./tyr-bin.exe specs/console.js
test-linux-centos-7-x64:
runs-on: ubuntu-latest
name: Test bindings on Linux-x64-glibc-2.17
needs:
- build
container:
image: centos:7
steps:
- uses: actions/checkout@v3
- name: Download binary
uses: actions/download-artifact@v3
with:
name: bin-x86_64-unknown-linux-gnu
- name: Run tests
run: |
chmod 777 tyr-bin
./tyr-bin specs/console.js
test-linux-centos-7-aarch64:
runs-on: ubuntu-latest
name: Test bindings on Linux-aarch64-glibc-2.17
needs:
- build
steps:
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- uses: actions/checkout@v3
- name: Download binary
uses: actions/download-artifact@v3
with:
name: bin-aarch64-unknown-linux-gnu
- name: Test bindings
uses: addnab/docker-run-action@v3
with:
image: multiarch/centos:aarch64-clean
options: -v ${{ github.workspace }}:/build -w /build
run: |
chmod 777 tyr-bin
./tyr-bin specs/console.js