-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update v3.9.0 (#249) from HapticX/dev
update v3.9.0
- Loading branch information
Showing
59 changed files
with
994 additions
and
1,246 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
[*.nim] | ||
indent_style = space | ||
indent_size = 2 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,88 +1,89 @@ | ||
name: Examples 📕 | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths-ignore: | ||
- 'docs/**' | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '*.md' | ||
- '*.nimble' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- '**/FUNDING.yml' | ||
- '**/gh-pages.yml' | ||
- '**/tests.yml' | ||
- '**/language_bindings.yml' | ||
- '**/jvm_bindings.yml' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '*.md' | ||
- '*.nimble' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- '**/FUNDING.yml' | ||
- '**/gh-pages.yml' | ||
- '**/tests.yml' | ||
- '**/language_bindings.yml' | ||
- '**/jvm_bindings.yml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
nim_version: | ||
- '2.0.0' | ||
env: | ||
TIMEOUT_EXIT_STATUS: 124 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Cache nimble | ||
id: cache-nimble | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.nimble | ||
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} | ||
- uses: jiro4989/setup-nim-action@v1 | ||
with: | ||
nim-version: ${{ matrix.nim_version }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
nimble refresh | ||
nimble install -y -d | ||
- name: Hello World 👋 | ||
run: | | ||
cd examples/hello_world/src | ||
nim c -d:httpx main | ||
cd ../../../ | ||
shell: bash | ||
|
||
- name: TODO App ✅ | ||
run: | | ||
cd examples/todo/src | ||
nim js --hints:off --warnings:off main | ||
cd ../../../ | ||
shell: bash | ||
|
||
- name: NimLang 👑 | ||
run: | | ||
cd examples/nimlang/src | ||
nimble install highlightjs | ||
nim js --hints:off --warnings:off main | ||
cd ../../../ | ||
shell: bash | ||
|
||
- name: Website 🌐 | ||
run: | | ||
cd examples/website/src | ||
nim js --hints:off --warnings:off main | ||
cd ../../../ | ||
shell: bash | ||
name: Examples 📕 | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
- 'dev' | ||
paths-ignore: | ||
- 'docs/**' | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '*.md' | ||
- '*.nimble' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- '**/FUNDING.yml' | ||
- '**/gh-pages.yml' | ||
- '**/tests.yml' | ||
- '**/language_bindings.yml' | ||
- '**/jvm_bindings.yml' | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '*.md' | ||
- '*.nimble' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- '**/FUNDING.yml' | ||
- '**/gh-pages.yml' | ||
- '**/tests.yml' | ||
- '**/language_bindings.yml' | ||
- '**/jvm_bindings.yml' | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
nim_version: | ||
- '2.0.0' | ||
env: | ||
TIMEOUT_EXIT_STATUS: 124 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/cache@v4 | ||
with: | ||
path: | ||
~/.nimble | ||
~/.choosenim | ||
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} | ||
- uses: jiro4989/setup-nim-action@v1 | ||
with: | ||
nim-version: ${{ matrix.nim_version }} | ||
|
||
- name: Install Dependencies | ||
run: | | ||
nimble refresh | ||
nimble install -y -d | ||
- name: Hello World 👋 | ||
run: | | ||
cd examples/hello_world/src | ||
nim c -d:httpx main | ||
cd ../../../ | ||
shell: bash | ||
|
||
- name: TODO App ✅ | ||
run: | | ||
cd examples/todo/src | ||
nim js --hints:off --warnings:off main | ||
cd ../../../ | ||
shell: bash | ||
|
||
- name: NimLang 👑 | ||
run: | | ||
cd examples/nimlang/src | ||
nimble install highlightjs | ||
nim js --hints:off --warnings:off main | ||
cd ../../../ | ||
shell: bash | ||
|
||
- name: Website 🌐 | ||
run: | | ||
cd examples/website/src | ||
nim js --hints:off --warnings:off main | ||
cd ../../../ | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,97 +1,85 @@ | ||
name: Github Pages 🌐 | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths-ignore: | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '*.md' | ||
- '*.nimble' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- '**/FUNDING.yml' | ||
- '**/tests.yml' | ||
- '**/examples.yml' | ||
- '**/language_bindings.yml' | ||
- '**/jvm_bindings.yml' | ||
pull_request: | ||
paths-ignore: | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '*.md' | ||
- '*.nimble' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- '**/FUNDING.yml' | ||
- '**/tests.yml' | ||
- '**/examples.yml' | ||
- '**/language_bindings.yml' | ||
- '**/jvm_bindings.yml' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
before: | ||
runs-on: windows-latest | ||
if: "! contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- run: echo "not contains '[skip ci]'" | ||
|
||
docs: | ||
runs-on: windows-latest | ||
needs: before | ||
env: | ||
nim_version: '2.0.0' | ||
node_version: '20' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js ${{ env.node_version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Install uglify-js 👀 | ||
run: | | ||
npm install uglify-js -g | ||
- name: Cache nimble | ||
id: cache-nimble | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.nimble | ||
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} | ||
|
||
- uses: jiro4989/setup-nim-action@v1 | ||
with: | ||
nim-version: ${{ env.nim_version }} | ||
|
||
- name: Install Dependencies 🔃 | ||
run: | | ||
nimble refresh | ||
nimble install -y | ||
- name: Generate API documents 📃 | ||
run: nim doc --index:on -d:docgen --project --out:docs --hints:off src/happyx.nim | ||
|
||
- name: Build HappyX website 🌐 | ||
timeout-minutes: 2 | ||
run: | | ||
cd ./examples/website/src/ | ||
nim js -d:production -d:release --opt:size --hints:off --warnings:off --out:main_full.js main | ||
uglifyjs main_full.js -c -m --mangle-props regex=/N[ST]I\w+/ -o main.js | ||
cd ../../.. | ||
mkdir ./docs/happyx/public/ | ||
mkdir ./docs/public/ | ||
cp ./examples/website/src/index.html ./docs/ | ||
cp ./examples/website/src/main.js ./docs/ | ||
cp ./examples/website/src/happyx/public/* ./docs/happyx/public/ | ||
cp ./examples/website/src/happyx/public/* ./docs/public/ | ||
- name: Deploy documents 💨 | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs | ||
if: github.ref == 'refs/heads/master' | ||
name: Github Pages 🌐 | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths-ignore: | ||
- '.github/ISSUE_TEMPLATE/*' | ||
- '*.md' | ||
- '*.nimble' | ||
- '.gitignore' | ||
- 'LICENSE' | ||
- '**/FUNDING.yml' | ||
- '**/tests.yml' | ||
- '**/examples.yml' | ||
- '**/language_bindings.yml' | ||
- '**/jvm_bindings.yml' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
before: | ||
runs-on: windows-latest | ||
if: "! contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- run: echo "not contains '[skip ci]'" | ||
|
||
docs: | ||
runs-on: windows-latest | ||
needs: before | ||
env: | ||
nim_version: '2.0.0' | ||
node_version: '20' | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js ${{ env.node_version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ env.node_version }} | ||
|
||
- name: Install uglify-js 👀 | ||
run: | | ||
npm install uglify-js -g | ||
- name: Cache nimble | ||
id: cache-nimble | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.nimble | ||
key: ${{ runner.os }}-nimble-${{ hashFiles('*.nimble') }} | ||
|
||
- uses: jiro4989/setup-nim-action@v1 | ||
with: | ||
nim-version: ${{ env.nim_version }} | ||
|
||
- name: Install Dependencies 🔃 | ||
run: | | ||
nimble refresh | ||
nimble install -y | ||
- name: Generate API documents 📃 | ||
run: nim doc --index:on -d:docgen --project --out:docs --hints:off src/happyx.nim | ||
|
||
- name: Build HappyX website 🌐 | ||
timeout-minutes: 2 | ||
run: | | ||
cd ./examples/website/src/ | ||
nim js -d:production -d:release --opt:size --hints:off --warnings:off --out:main_full.js main | ||
uglifyjs main_full.js -c -m --mangle-props regex=/N[ST]I\w+/ -o main.js | ||
cd ../../.. | ||
mkdir ./docs/happyx/public/ | ||
mkdir ./docs/public/ | ||
cp ./examples/website/src/index.html ./docs/ | ||
cp ./examples/website/src/main.js ./docs/ | ||
cp ./examples/website/src/happyx/public/* ./docs/happyx/public/ | ||
cp ./examples/website/src/happyx/public/* ./docs/public/ | ||
- name: Deploy documents 💨 | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./docs | ||
if: github.ref == 'refs/heads/master' |
Oops, something went wrong.