2020-10-14 17:15:20 +09:00
|
|
|
name: Linux musl
|
2020-06-10 19:55:40 +09:00
|
|
|
|
2020-10-15 17:14:11 +09:00
|
|
|
env:
|
|
|
|
DEBUG: 'napi:*'
|
|
|
|
|
2020-08-17 23:36:09 +09:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [master, develop]
|
|
|
|
pull_request:
|
2020-06-10 19:55:40 +09:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2020-10-14 17:15:20 +09:00
|
|
|
name: stable - x86_64-unknown-linux-musl - node@14
|
2020-06-10 19:55:40 +09:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Log in to registry
|
|
|
|
run: |
|
|
|
|
docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD $DOCKER_REGISTRY_URL
|
|
|
|
env:
|
|
|
|
DOCKER_REGISTRY_URL: docker.pkg.github.com
|
|
|
|
DOCKER_USERNAME: ${{ github.actor }}
|
|
|
|
DOCKER_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Pull docker image
|
|
|
|
run: |
|
|
|
|
docker pull docker.pkg.github.com/napi-rs/napi-rs/rust-nodejs-alpine:lts
|
|
|
|
docker tag docker.pkg.github.com/napi-rs/napi-rs/rust-nodejs-alpine:lts builder
|
|
|
|
|
2020-07-29 23:04:47 +09:00
|
|
|
- name: 'Install node dependencies'
|
|
|
|
run: docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder yarn
|
|
|
|
|
2020-09-30 15:34:26 +09:00
|
|
|
- name: 'Install swc musl'
|
|
|
|
run: docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder yarn add @swc/core-linux-musl --dev
|
|
|
|
|
2020-07-29 23:04:47 +09:00
|
|
|
- name: 'Build TypeScript'
|
|
|
|
run: docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder yarn build
|
|
|
|
|
2020-06-10 19:55:40 +09:00
|
|
|
- name: Run check
|
|
|
|
run: |
|
2020-08-03 13:21:22 +09:00
|
|
|
docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder cargo check -vvv
|
2020-06-10 19:55:40 +09:00
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: |
|
2020-07-15 01:43:20 +09:00
|
|
|
docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder cargo test -p napi-sys --lib -- --nocapture
|
2020-06-10 19:55:40 +09:00
|
|
|
|
2020-06-17 21:33:28 +09:00
|
|
|
- name: Unit test
|
2020-06-10 19:55:40 +09:00
|
|
|
run: |
|
2020-10-14 17:15:20 +09:00
|
|
|
docker run --rm -v $(pwd)/.cargo:/root/.cargo -v $(pwd):/napi-rs -w /napi-rs builder sh -c "yarn build:test && yarn test"
|
2020-06-10 19:55:40 +09:00
|
|
|
env:
|
|
|
|
RUST_BACKTRACE: 1
|