Skip to content

Commit

Permalink
Merge pull request #893 from pixiv/github-actions
Browse files Browse the repository at this point in the history
GitHub Actions
  • Loading branch information
0b5vr authored Jan 18, 2022
2 parents bacd6c0 + f0d8382 commit 686ae2f
Show file tree
Hide file tree
Showing 9 changed files with 195 additions and 215 deletions.
89 changes: 0 additions & 89 deletions .circleci/config.yml

This file was deleted.

182 changes: 182 additions & 0 deletions .github/workflows/inspect.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: Inspect

on: push

defaults:
run:
shell: bash

jobs:
fetch:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Deps
uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles( 'yarn.lock' ) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Fetch Deps
run: yarn install --frozen-lockfile

lint:
runs-on: ubuntu-latest
needs: fetch
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Deps
uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles( 'yarn.lock' ) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Lint
run: yarn lint

test:
runs-on: ubuntu-latest
needs: fetch
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Deps
uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles( 'yarn.lock' ) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Test
run: yarn test

build:
runs-on: ubuntu-latest
needs: fetch
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Deps
uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles( 'yarn.lock' ) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Build
run: yarn build
- name: Upload Builds
uses: actions/upload-artifact@v2
with:
name: build
path: |
packages/*/lib/
packages/*/types/
packages/*/ts*/
docs:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Deps
uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles( 'yarn.lock' ) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Download Builds
uses: actions/download-artifact@v2
with:
name: build
path: packages
- name: Build Docs
run: yarn docs
- name: Upload Docs
uses: actions/upload-artifact@v2
with:
name: docs
path: |
packages/*/docs/
gh-pages:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/release' }}
needs:
- build
- docs
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Cache Deps
uses: actions/cache@v2
with:
path: |
node_modules
packages/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles( 'yarn.lock' ) }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Download Builds
uses: actions/download-artifact@v2
with:
name: build
path: public/packages
- name: Download Docs
uses: actions/download-artifact@v2
with:
name: docs
path: public/packages
- name: Copy Examples
run: |
for d in packages/*; do
if [[ -e "$d/examples" ]]; then
mkdir -p public/$d
cp -r $d/examples public/$d
fi
done
- name: Deploy to gh-pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: public
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function processSomeVector(v: THREE.Vector3): number {

```sh
yarn lerna version <newversion> # will also automatically runs build scripts
yarn lerna publish from-git # will also automatically pushes some files into `gh-pages` branch
yarn lerna publish from-git

git switch release
git merge dev
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Use [VRM](https://vrm.dev/) on [three.js](https://threejs.org/)

[GitHub Repository](https://github.com/pixiv/three-vrm/)

[Examples](https://pixiv.github.io/three-vrm/examples)
[Examples](https://pixiv.github.io/three-vrm/packages/three-vrm/examples)

[Documentation](https://pixiv.github.io/three-vrm/docs)
[Documentation](https://pixiv.github.io/three-vrm/packages/three-vrm/docs)

## Usage

Expand Down
4 changes: 2 additions & 2 deletions packages/three-vrm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Use [VRM](https://vrm.dev/) on [three.js](https://threejs.org/)

[GitHub Repository](https://github.com/pixiv/three-vrm/)

[Examples](https://pixiv.github.io/three-vrm/examples)
[Examples](https://pixiv.github.io/three-vrm/packages/three-vrm/examples)

[Documentation](https://pixiv.github.io/three-vrm/docs)
[Documentation](https://pixiv.github.io/three-vrm/packages/three-vrm/docs)

## Usage

Expand Down
18 changes: 0 additions & 18 deletions packages/three-vrm/bin/gh-pages.js

This file was deleted.

3 changes: 0 additions & 3 deletions packages/three-vrm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
},
"scripts": {
"version": "yarn all",
"postpublish": "yarn gh-pages",
"all": "yarn && yarn test && yarn lint && yarn clean && yarn build && yarn docs",
"dev": "cross-env NODE_ENV=development SERVE=1 rollup -w -c -o lib/three-vrm.js",
"clean": "rimraf docs lib ts*/ types",
Expand All @@ -37,7 +36,6 @@
"build-moduleprod": "cross-env NODE_ENV=production ESM=1 rollup -c -o lib/three-vrm.module.min.js",
"build-types": "tsc --declaration --declarationDir ./types --emitDeclarationOnly && downlevel-dts types ts3.4/types",
"docs": "typedoc --entryPoints ./src/index.ts --out docs",
"gh-pages": "node ./bin/gh-pages.js",
"test": "echo There is no test for three-vrm",
"lint": "eslint \"src/**/*.{ts,tsx}\" && prettier \"src/**/*.{ts,tsx}\" --check",
"lint-fix": "eslint \"src/**/*.{ts,tsx}\" --fix && prettier \"src/**/*.{ts,tsx}\" --write",
Expand All @@ -51,7 +49,6 @@
},
"devDependencies": {
"@types/three": "^0.136.1",
"gh-pages": "^3.1.0",
"lint-staged": "10.5.4",
"quicktype": "^15.0.258",
"three": "^0.136.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/three-vrm/src/material/getTexelDecodingFunction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ export const getEncodingComponents = (encoding: THREE.TextureEncoding): [string,
case THREE.sRGBEncoding:
return ['sRGB', '( value )'];
default:
console.warn( 'THREE.WebGLProgram: Unsupported encoding:', encoding );
return [ 'Linear', '( value )' ];
console.warn('THREE.WebGLProgram: Unsupported encoding:', encoding);
return ['Linear', '( value )'];
}
} else {
// COMPAT: pre-r136
Expand Down
Loading

0 comments on commit 686ae2f

Please sign in to comment.