mirror of
https://github.com/fluencelabs/registry.git
synced 2025-04-24 09:42:14 +00:00
ci: move from circle to gh (#112)
This commit is contained in:
parent
00493147b4
commit
f2640cf372
@ -1,60 +0,0 @@
|
||||
version: 2.1
|
||||
|
||||
orbs:
|
||||
docker: circleci/docker@1.5.0
|
||||
|
||||
jobs:
|
||||
Build and test Rust service:
|
||||
docker:
|
||||
- image: circleci/rust:latest
|
||||
resource_class: xlarge
|
||||
environment:
|
||||
RUST_BACKTRACE: full
|
||||
steps:
|
||||
- checkout
|
||||
- run: |
|
||||
sudo bash .github/download_marine.sh
|
||||
- restore_cache:
|
||||
keys:
|
||||
- registry05-{{ checksum "service/Cargo.lock" }}
|
||||
- run: |
|
||||
cd ./service
|
||||
rustup toolchain install nightly-2022-01-16-x86_64-unknown-linux-gnu
|
||||
rustup default nightly-2022-01-16-x86_64-unknown-linux-gnu
|
||||
rustup override set nightly-2022-01-16-x86_64-unknown-linux-gnu
|
||||
rustup target add wasm32-wasi --toolchain nightly-2022-01-16-x86_64-unknown-linux-gnu
|
||||
- run: ./service/build.sh
|
||||
- run: |
|
||||
cd ./service
|
||||
cargo test --no-fail-fast --release --all-features -- --test-threads=1
|
||||
- save_cache:
|
||||
paths:
|
||||
- ~/.cargo
|
||||
- ~/.rustup
|
||||
key: registry05-{{ checksum "service/Cargo.lock" }}
|
||||
|
||||
Test example:
|
||||
docker:
|
||||
- image: cimg/node:16.15
|
||||
steps:
|
||||
- checkout
|
||||
- restore_cache:
|
||||
keys:
|
||||
- registry00-{{ checksum "example/package-lock.json" }}
|
||||
- run: |
|
||||
cd example
|
||||
npm i
|
||||
- run: |
|
||||
cd example
|
||||
npm run start
|
||||
- save_cache:
|
||||
paths:
|
||||
- ~/example/node-modules
|
||||
key: registry00-{{ checksum "example/package-lock.json" }}
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
CircleCI:
|
||||
jobs:
|
||||
- Build and test Rust service
|
||||
- Test example
|
81
.github/workflows/registry.yml
vendored
Normal file
81
.github/workflows/registry.yml
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
name: registry
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- "master"
|
||||
|
||||
env:
|
||||
RUST_BACKTRACE: 1
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
concurrency:
|
||||
group: "${{ github.workflow }}-${{ github.ref }}"
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
nextest:
|
||||
name: "cargo nextest"
|
||||
runs-on: builder
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: service
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: nightly
|
||||
target: wasm32-wasi
|
||||
default: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: "Install libsqlite"
|
||||
run: apt-get install libsqlite3-dev
|
||||
|
||||
- name: "Cache rust"
|
||||
uses: Swatinem/rust-cache@v1
|
||||
|
||||
- name: "Download marine"
|
||||
run: $GITHUB_WORKSPACE/.github/download_marine.sh
|
||||
|
||||
- name: "Build service"
|
||||
run: ./build.sh
|
||||
|
||||
- name: "cargo fmt"
|
||||
run: cargo fmt --all -- --check
|
||||
|
||||
- name: "cargo clippy"
|
||||
run: cargo clippy -Z unstable-options --all
|
||||
|
||||
- name: "Install nextest"
|
||||
run: cargo install --locked cargo-nextest --version 0.9.22
|
||||
|
||||
- name: "cargo nextest"
|
||||
run: cargo nextest run --release --all-features --no-fail-fast --test-threads=1 --
|
||||
|
||||
example:
|
||||
name: "Test example"
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: example
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
- name: "Install example dependencies"
|
||||
uses: bahmutov/npm-install@v1
|
||||
with:
|
||||
working-directory: example
|
||||
|
||||
- name: "Run example"
|
||||
run: npm run start
|
4
.github/workflows/release.yml
vendored
4
.github/workflows/release.yml
vendored
@ -8,7 +8,7 @@ on:
|
||||
jobs:
|
||||
npm-publish:
|
||||
name: "Publish"
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: builder
|
||||
container: rust
|
||||
defaults:
|
||||
run:
|
||||
@ -149,7 +149,7 @@ jobs:
|
||||
repo: fluencelabs/node-distro
|
||||
ref: 'main'
|
||||
token: ${{ secrets.PERSONAL_TOKEN }}
|
||||
inputs: '{
|
||||
inputs: '{
|
||||
"name": "registry",
|
||||
"version": "${{ env.RELEASE_VERSION }}",
|
||||
"url": "${{ steps.package-url.outputs.result }}",
|
||||
|
6038
example/package-lock.json
generated
6038
example/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -40,15 +40,15 @@ mod tetraplets_checkers;
|
||||
extern crate fstrings;
|
||||
|
||||
/*
|
||||
_initialize function that calls __wasm_call_ctors is required to mitigade memory leak
|
||||
that is described in https://github.com/WebAssembly/wasi-libc/issues/298
|
||||
_initialize function that calls __wasm_call_ctors is required to mitigade memory leak
|
||||
that is described in https://github.com/WebAssembly/wasi-libc/issues/298
|
||||
|
||||
In short, without this code rust wraps every export function
|
||||
with __wasm_call_ctors/__wasm_call_dtors calls. This causes memory leaks. When compiler sees
|
||||
an explicit call to __wasm_call_ctors in _initialize function, it disables export wrapping.
|
||||
In short, without this code rust wraps every export function
|
||||
with __wasm_call_ctors/__wasm_call_dtors calls. This causes memory leaks. When compiler sees
|
||||
an explicit call to __wasm_call_ctors in _initialize function, it disables export wrapping.
|
||||
|
||||
TODO: remove when updating to marine-rs-sdk with fix
|
||||
*/
|
||||
TODO: remove when updating to marine-rs-sdk with fix
|
||||
*/
|
||||
extern "C" {
|
||||
pub fn __wasm_call_ctors();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user