Skip to content

Commit

Permalink
Merge branch 'master' into rc-vlist
Browse files Browse the repository at this point in the history
  • Loading branch information
futursolo committed Apr 2, 2023
2 parents 4555f15 + 86b6cb4 commit a0a1b58
Show file tree
Hide file tree
Showing 229 changed files with 7,082 additions and 7,135 deletions.
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[target.'cfg(target_arch = "wasm32")']
runner = 'wasm-bindgen-test-runner'

# This section needs to be last.
# GitHub Actions modifies this section.
[unstable]
doctest-xcompile = true
14 changes: 0 additions & 14 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,6 @@ updates:
interval: "weekly"
day: "friday"
open-pull-requests-limit: 5

- package-ecosystem: "cargo"
directory: "/examples"
schedule:
interval: "weekly"
day: "friday"
open-pull-requests-limit: 5

- package-ecosystem: "cargo"
directory: "/tools"
schedule:
interval: "weekly"
day: "friday"
open-pull-requests-limit: 5

- package-ecosystem: "npm"
directory: "/website"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/auto-approve-maintainer-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
steps:
- name: Check if organization member
id: is_organization_member
uses: JamesSingleton/is-organization-member@1.0.0
uses: JamesSingleton/is-organization-member@1.0.1
with:
organization: "yewstack"
username: ${{ github.actor }}
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/benchmark-ssr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Checkout master
uses: actions/checkout@v3
with:
repository: 'yewstack/yew'
repository: "yewstack/yew"
ref: master
path: yew-master

Expand Down Expand Up @@ -50,19 +50,19 @@ jobs:
key: pr

- name: Run pull request benchmark
run: cargo run --profile=bench --bin benchmark-ssr -- --output-path ./output.json
working-directory: current-pr/tools
run: cargo run --profile=bench -- --output-path ../output.json
working-directory: current-pr/tools/benchmark-ssr

- name: Run master benchmark
run: cargo run --profile=bench --bin benchmark-ssr -- --output-path ./output.json
working-directory: yew-master/tools
run: cargo run --profile=bench -- --output-path ../output.json
working-directory: yew-master/tools/benchmark-ssr

- name: Write Pull Request ID
run: |
echo "${{ github.event.number }}" > .PR_NUMBER
- name: Upload Artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: benchmark-ssr
path: |
Expand Down
89 changes: 47 additions & 42 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Benchmark
on:
push:
paths-ignore:
- 'website/**'
- "website/**"
branches:
- master
pull_request:
paths-ignore:
- 'website/**'
- "website/**"
types: [labeled, synchronize, opened, reopened]

permissions:
Expand All @@ -22,15 +22,14 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
path: "./yew"
path: "yew"

- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
repository: krausest/js-framework-benchmark
path: "./js-framework-benchmark"
ref: 3e0fff7973417acd8b00c2fc3e94a01dfa6f3438
path: "js-framework-benchmark"

- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -43,73 +42,79 @@ jobs:
version: "latest"

- name: Setup Node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
cache: "npm"
cache-dependency-path: js-framework-benchmark/package-lock.json

- uses: Swatinem/rust-cache@v2
with:
working-directory: yew

- uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-benchmark-${{ hashFiles('js-framework-benchmark/package-lock.json') }}-${{ hashFiles('js-framework-benchmark/webdriver-ts/package-lock.json') }}
restore-keys: |
${{ runner.os }}-benchmark-
${{ runner.os }}

- name: setup js-framework-benchmark
shell: bash
working-directory: js-framework-benchmark
run: |
npm ci
npm run install-server
npm run install-webdriver-ts
- name: setup benchmark-struct benchmark
shell: bash
run: |
sed -i "s#../..#`realpath ./yew/`#" yew/tools/benchmark-struct/Cargo.toml
rm -rf js-framework-benchmark/frameworks/keyed/yew/*
cp -r yew/tools/benchmark-struct/* js-framework-benchmark/frameworks/keyed/yew/
ls -lauh
rm *.js
rm *.wasm
echo "STRUCT_BUILD_DIR=$PWD" >> $GITHUB_ENV
working-directory: js-framework-benchmark/frameworks/keyed/yew/bundled-dist/

- name: build benchmark-struct app
shell: bash
working-directory: js-framework-benchmark/frameworks/keyed/yew/
working-directory: yew/tools/benchmark-struct
run: |
npm ci
npm run build-prod-without-tools-install
wasm-pack build \
--release \
--target web \
--no-typescript \
--out-name js-framework-benchmark-yew \
--out-dir $STRUCT_BUILD_DIR
- name: show built benchmark-struct benchmark files
run: |
ls -lauh js-framework-benchmark/frameworks/keyed/yew/bundled-dist/
- name: setup yew-hooks benchmark
shell: bash
run: |
sed -i "s#../..#`realpath ./yew/`#" yew/tools/benchmark-hooks/Cargo.toml
rm -rf js-framework-benchmark/frameworks/keyed/yew-hooks/*
cp -r yew/tools/benchmark-hooks/* js-framework-benchmark/frameworks/keyed/yew-hooks/
ls -lauh
rm *.js
rm *.wasm
echo "HOOKS_BUILD_DIR=$PWD" >> $GITHUB_ENV
working-directory: js-framework-benchmark/frameworks/keyed/yew-hooks/bundled-dist/

- name: build benchmark-hooks app
shell: bash
working-directory: js-framework-benchmark/frameworks/keyed/yew-hooks/
working-directory: yew/tools/benchmark-hooks
run: |
npm ci
npm run build-prod-without-tools-install
wasm-pack build \
--release \
--target web \
--no-typescript \
--out-name js-framework-benchmark-yew-hooks \
--out-dir $HOOKS_BUILD_DIR
- name: show built benchmark-hooks benchmark files
run: |
ls -lauh js-framework-benchmark/frameworks/keyed/yew-hooks/bundled-dist/
- name: run js-framework-benchmark server
shell: bash
working-directory: js-framework-benchmark
run: npm start &
run: |
npm start &
sleep 5
- name: js-framework-benchmark/webdriver-ts npm run bench
shell: bash
working-directory: js-framework-benchmark/webdriver-ts
run: npm run tsbench -- --framework keyed/yew keyed/yew-hooks --runner playwright --headless
run: xvfb-run npm run bench -- --framework keyed/yew keyed/yew-hooks --runner playwright

- name: transform results to be fit for display benchmark-action/github-action-benchmark@v1
shell: bash
run: |
mkdir artifacts/
jq -s . js-framework-benchmark/webdriver-ts/results/*.json | cargo run --manifest-path yew/tools/Cargo.toml --release -p process-benchmark-results > artifacts/results.json
jq -s . js-framework-benchmark/webdriver-ts/results/*.json | cargo run --manifest-path yew/Cargo.toml --release -p process-benchmark-results > artifacts/results.json
echo "$EVENT_INFO" > artifacts/PR_INFO
env:
EVENT_INFO: ${{ toJSON(github.event) }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
env:
PR_INFO_FILE: ".PR_INFO"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
Expand All @@ -46,7 +46,7 @@ jobs:
cp -r target/doc/* api-docs/dist/next
- name: Upload build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: api-docs
path: api-docs/
Expand All @@ -59,7 +59,7 @@ jobs:
- if: github.event_name == 'pull_request'
name: Upload pr info
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pr-info
path: "${{ env.PR_INFO_FILE }}"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
env:
PR_INFO_FILE: ".PR_INFO"
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup node
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: "16"

Expand All @@ -48,7 +48,7 @@ jobs:
npm run build
- name: Upload build artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: website
path: website/build/
Expand All @@ -61,7 +61,7 @@ jobs:
- if: github.event_name == 'pull_request'
name: Upload pr info
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: pr-info
path: "${{ env.PR_INFO_FILE }}"
Expand Down
83 changes: 83 additions & 0 deletions .github/workflows/clippy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Clippy

on:
pull_request:
paths:
- ".github/workflows/clippy.yml"
- "tools/**/*"
- "examples/**/*"
- "packages/**/*"
- "Cargo.toml"
- "Cargo.lock"
push:
branches: [master]

jobs:
feature-soundness:
name: Feature Soundness
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
profile:
- dev
- release
steps:
- uses: actions/checkout@v3

- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy

- uses: Swatinem/rust-cache@v2

- name: Lint feature soundness
if: matrix.profile == 'dev'
run: bash ../../ci/feature-soundness.sh
working-directory: packages/yew

- name: Lint feature soundness
if: matrix.profile == 'release'
run: bash ../../ci/feature-soundness-release.sh
working-directory: packages/yew

- name: Run release clippy
if: matrix.profile == 'release'
run: |
ls packages | xargs -I {} \
cargo clippy \
-p {} \
--all-targets \
--all-features \
--workspace \
-- -D warnings
clippy:
name: Clippy Workspace
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain:
- stable

steps:
- uses: actions/checkout@v3

- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy

- uses: Swatinem/rust-cache@v2

- name: Run clippy
run: |
cargo clippy \
--all-targets \
--all-features \
--workspace \
-- -D warnings
2 changes: 1 addition & 1 deletion .github/workflows/fmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: cargo fmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Setup toolchain
uses: dtolnay/rust-toolchain@master
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/inspect-next-changelogs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
fetch-depth: 0

Expand Down
Loading

0 comments on commit a0a1b58

Please sign in to comment.