feat: generate rust-c bindings automatically #18
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: Build Release target | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: seanmiddleditch/gha-setup-ninja@master | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
- name: Install Ninja | |
run: sudo apt-get install -y ninja-build | |
- name: Install cbindgen | |
run: cargo install --force cbindgen | |
- name: Configure CMake | |
run: cmake -G Ninja -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=Release | |
- name: Build target | |
run: cmake --build ${{github.workspace}}/build --target qjs run-test262 -j 8 | |
- name: Test | |
run: ./bin/qjs -e 'console.log("Hello, World!")' | |