diff --git a/.copier-answers.yaml b/.copier-answers.yaml index ec5a777..bb304a4 100644 --- a/.copier-answers.yaml +++ b/.copier-answers.yaml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: '4875149' +_commit: c2ea129 _src_path: https://github.com/python-project-templates/base.git add_docs: true add_extension: rustjswasm diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 1942e1e..ec3ad2a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -34,15 +34,17 @@ jobs: node-version: [22.x] steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false - - uses: actions-ext/python/setup@main + - uses: actions-ext/python/setup@6e1b91a408ea89f49bc8aff8724f83826f7b5446 with: version: ${{ matrix.python-version }} - - uses: actions-ext/rust/setup@main + - uses: actions-ext/rust/setup@c9cdbe5cc8a2485bf2eb22644302559c741ca763 - - uses: actions-ext/node/setup@main + - uses: actions-ext/node/setup@0ea5bdcd24d2488b28e16bf611b446a2f8e1e12f with: version: ${{ matrix.node-version }} @@ -64,7 +66,7 @@ jobs: run: make coverage - name: Upload test results (Python) - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: test-results-${{ matrix.os }}-${{ matrix.python-version }} path: '**/junit.xml' @@ -107,17 +109,17 @@ jobs: CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=11.0 if: matrix.os != 'ubuntu-latest' - - uses: actions-ext/python/test-wheel@main + - uses: actions-ext/python/test-wheel@6e1b91a408ea89f49bc8aff8724f83826f7b5446 with: module: python_template_rust if: matrix.os == 'ubuntu-latest' - - uses: actions-ext/python/test-sdist@main + - uses: actions-ext/python/test-sdist@6e1b91a408ea89f49bc8aff8724f83826f7b5446 with: module: python_template_rust if: matrix.os == 'ubuntu-latest' - - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 with: name: dist-${{matrix.os}} path: dist diff --git a/.github/workflows/copier.yaml b/.github/workflows/copier.yaml index 871b414..a936d5f 100644 --- a/.github/workflows/copier.yaml +++ b/.github/workflows/copier.yaml @@ -12,6 +12,6 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions-ext/copier-update@main + - uses: actions-ext/copier-update@378500315a83b5985e175139a55f1fa5ea6dde09 with: token: ${{ secrets.WORKFLOW_TOKEN }} diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 084c79f..e4ee471 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -16,38 +16,41 @@ jobs: runs-on: ubuntu-latest if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }} steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - uses: actions-ext/python/setup@main - - - name: Download dist from build - uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 - with: - pattern: dist-ubuntu-latest* - merge-multiple: true - path: dist - run-id: ${{ github.event.workflow_run.id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - repository: ${{ github.repository }} - if: github.event_name == 'workflow_run' - - - name: Install from wheel - run: | - uv pip install dist/*.whl - uv pip install dist/*.whl --target . --no-deps - uv pip install yardang - if: github.event_name == 'workflow_run' - - - name: Install from source (manual trigger) - run: | - make develop - uv pip install . - uv pip install yardang - if: github.event_name == 'workflow_dispatch' - - - run: yardang build - - - uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 - with: - publish_branch: gh-pages - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: docs/html + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - uses: actions-ext/python/setup@6e1b91a408ea89f49bc8aff8724f83826f7b5446 + + - name: Download dist from build + uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8 + with: + pattern: dist-ubuntu-latest* + merge-multiple: true + path: dist + run-id: ${{ github.event.workflow_run.id }} + github-token: ${{ secrets.GITHUB_TOKEN }} + repository: ${{ github.repository }} + if: github.event_name == 'workflow_run' + + - name: Install from wheel + run: | + uv pip install dist/*.whl + uv pip install dist/*.whl --target . --no-deps + uv pip install yardang + if: github.event_name == 'workflow_run' + + - name: Install from source (manual trigger) + run: | + make develop + uv pip install . + uv pip install yardang + if: github.event_name == 'workflow_dispatch' + + - run: yardang build + + - uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0 + with: + publish_branch: gh-pages + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/html diff --git a/.github/workflows/wiki.yaml b/.github/workflows/wiki.yaml index 94125cb..4f80bb0 100644 --- a/.github/workflows/wiki.yaml +++ b/.github/workflows/wiki.yaml @@ -20,8 +20,11 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - - run: cp README.md docs/wiki/Home.md - - uses: Andrew-Chen-Wang/github-wiki-action@1bbb4280446f9630e8e21a18012cbacf3b0f992e # v5.0.6 - with: - path: docs/wiki + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + + - run: cp README.md docs/wiki/Home.md + - uses: Andrew-Chen-Wang/github-wiki-action@1bbb4280446f9630e8e21a18012cbacf3b0f992e # v5.0.6 + with: + path: docs/wiki diff --git a/Cargo.lock b/Cargo.lock index 82e46e5..98abd1b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -31,9 +31,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.186" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "once_cell" @@ -43,15 +43,15 @@ checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "portable-atomic" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" +checksum = "3d20d5497ef88037a52ff98267d066e7f11fcc5e99bbfbd58a42336193aacec3" [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -99,7 +99,7 @@ dependencies = [ "proc-macro2", "pyo3-macros-backend", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -111,7 +111,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -139,9 +139,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -154,9 +154,9 @@ checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -164,29 +164,40 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -237,7 +248,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn", + "syn 2.0.119", "wasm-bindgen-shared", ] diff --git a/js/package.json b/js/package.json index 561560c..05577c5 100644 --- a/js/package.json +++ b/js/package.json @@ -28,7 +28,7 @@ "scripts": { "setup": "cargo install -f wasm-bindgen-cli --version 0.2.126 --locked", "build:debug": "node build.mjs --debug", - "build:rust": "cargo build --release --all-features --target wasm32-unknown-unknown", + "build:rust": "cargo build --release --all-features --target wasm32-unknown-unknown --target-dir ../target", "build:wasm-bindgen": "wasm-bindgen ../target/wasm32-unknown-unknown/release/python_template_rust.wasm --out-dir ./dist/pkg --target web", "build:prod": "node build.mjs", "build": "npm-run-all build:rust build:wasm-bindgen build:prod",