forked from Rust-related/RustPython
Bumps the github-actions group with 7 updates: | Package | From | To | | --- | --- | --- | | [actions/checkout](https://github.com/actions/checkout) | `3` | `4` | | [actions/setup-python](https://github.com/actions/setup-python) | `4` | `5` | | [actions/setup-node](https://github.com/actions/setup-node) | `3` | `4` | | [mwilliamson/setup-wabt-action](https://github.com/mwilliamson/setup-wabt-action) | `1` | `3` | | [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages) | `2` | `4` | | [wasmerio/setup-wasmer](https://github.com/wasmerio/setup-wasmer) | `2` | `3` | | [codecov/codecov-action](https://github.com/codecov/codecov-action) | `3` | `5` | Updates `actions/checkout` from 3 to 4 - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) Updates `actions/setup-python` from 4 to 5 - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) Updates `actions/setup-node` from 3 to 4 - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) Updates `mwilliamson/setup-wabt-action` from 1 to 3 - [Release notes](https://github.com/mwilliamson/setup-wabt-action/releases) - [Commits](https://github.com/mwilliamson/setup-wabt-action/compare/v1...v3) Updates `peaceiris/actions-gh-pages` from 2 to 4 - [Release notes](https://github.com/peaceiris/actions-gh-pages/releases) - [Changelog](https://github.com/peaceiris/actions-gh-pages/blob/main/CHANGELOG.md) - [Commits](https://github.com/peaceiris/actions-gh-pages/compare/v2...v4) Updates `wasmerio/setup-wasmer` from 2 to 3 - [Release notes](https://github.com/wasmerio/setup-wasmer/releases) - [Commits](https://github.com/wasmerio/setup-wasmer/compare/v2...v3) Updates `codecov/codecov-action` from 3 to 5 - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-action/compare/v3...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: mwilliamson/setup-wabt-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: peaceiris/actions-gh-pages dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: wasmerio/setup-wasmer dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions - dependency-name: codecov/codecov-action dependency-type: direct:production update-type: version-update:semver-major dependency-group: github-actions ... Signed-off-by: dependabot[bot] <support@github.com>
149 lines
5.7 KiB
YAML
149 lines
5.7 KiB
YAML
on:
|
|
schedule:
|
|
- cron: '0 0 * * 6'
|
|
workflow_dispatch:
|
|
|
|
name: Periodic checks/tasks
|
|
|
|
env:
|
|
CARGO_ARGS: --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
|
|
PYTHON_VERSION: "3.12.0"
|
|
|
|
jobs:
|
|
# codecov collects code coverage data from the rust tests, python snippets and python test suite.
|
|
# This is done using cargo-llvm-cov, which is a wrapper around llvm-cov.
|
|
codecov:
|
|
name: Collect code coverage data
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: taiki-e/install-action@cargo-llvm-cov
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
- run: sudo apt-get update && sudo apt-get -y install lcov
|
|
- name: Run cargo-llvm-cov with Rust tests.
|
|
run: cargo llvm-cov --no-report --workspace --exclude rustpython_wasm --verbose --no-default-features --features stdlib,zlib,importlib,encodings,ssl,jit
|
|
- name: Run cargo-llvm-cov with Python snippets.
|
|
run: python scripts/cargo-llvm-cov.py
|
|
continue-on-error: true
|
|
- name: Run cargo-llvm-cov with Python test suite.
|
|
run: cargo llvm-cov --no-report run -- -m test -u all --slowest --fail-env-changed
|
|
continue-on-error: true
|
|
- name: Prepare code coverage data
|
|
run: cargo llvm-cov report --lcov --output-path='codecov.lcov'
|
|
- name: Upload to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
file: ./codecov.lcov
|
|
|
|
testdata:
|
|
name: Collect regression test data
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- name: build rustpython
|
|
run: cargo build --release --verbose
|
|
- name: collect tests data
|
|
run: cargo run --release extra_tests/jsontests.py
|
|
env:
|
|
RUSTPYTHONPATH: ${{ github.workspace }}/Lib
|
|
- name: upload tests data to the website
|
|
env:
|
|
SSHKEY: ${{ secrets.ACTIONS_TESTS_DATA_DEPLOY_KEY }}
|
|
GITHUB_ACTOR: ${{ github.actor }}
|
|
run: |
|
|
echo "$SSHKEY" >~/github_key
|
|
chmod 600 ~/github_key
|
|
export GIT_SSH_COMMAND="ssh -i ~/github_key"
|
|
|
|
git clone git@github.com:RustPython/rustpython.github.io.git website
|
|
cd website
|
|
cp ../extra_tests/cpython_tests_results.json ./_data/regrtests_results.json
|
|
git add ./_data/regrtests_results.json
|
|
if git -c user.name="Github Actions" -c user.email="actions@github.com" commit -m "Update regression test results" --author="$GITHUB_ACTOR"; then
|
|
git push
|
|
fi
|
|
|
|
whatsleft:
|
|
name: Collect what is left data
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
- name: build rustpython
|
|
run: cargo build --release --verbose
|
|
- name: Collect what is left data
|
|
run: |
|
|
chmod +x ./whats_left.py
|
|
./whats_left.py > whats_left.temp
|
|
env:
|
|
RUSTPYTHONPATH: ${{ github.workspace }}/Lib
|
|
- name: Upload data to the website
|
|
env:
|
|
SSHKEY: ${{ secrets.ACTIONS_TESTS_DATA_DEPLOY_KEY }}
|
|
GITHUB_ACTOR: ${{ github.actor }}
|
|
run: |
|
|
echo "$SSHKEY" >~/github_key
|
|
chmod 600 ~/github_key
|
|
export GIT_SSH_COMMAND="ssh -i ~/github_key"
|
|
|
|
git clone git@github.com:RustPython/rustpython.github.io.git website
|
|
cd website
|
|
[ -f ./_data/whats_left.temp ] && cp ./_data/whats_left.temp ./_data/whats_left_lastrun.temp
|
|
cp ../whats_left.temp ./_data/whats_left.temp
|
|
git add -A
|
|
if git -c user.name="Github Actions" -c user.email="actions@github.com" commit -m "Update what is left results" --author="$GITHUB_ACTOR"; then
|
|
git push
|
|
fi
|
|
|
|
benchmark:
|
|
name: Collect benchmark data
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.9
|
|
- run: cargo install cargo-criterion
|
|
- name: build benchmarks
|
|
run: cargo build --release --benches
|
|
- name: collect execution benchmark data
|
|
run: cargo criterion --bench execution
|
|
- name: collect microbenchmarks data
|
|
run: cargo criterion --bench microbenchmarks
|
|
- name: restructure generated files
|
|
run: |
|
|
cd ./target/criterion/reports
|
|
find -type d -name cpython | xargs rm -rf
|
|
find -type d -name rustpython | xargs rm -rf
|
|
find -mindepth 2 -maxdepth 2 -name violin.svg | xargs rm -rf
|
|
find -type f -not -name violin.svg | xargs rm -rf
|
|
for file in $(find -type f -name violin.svg); do mv $file $(echo $file | sed -E "s_\./([^/]+)/([^/]+)/violin\.svg_./\1/\2.svg_"); done
|
|
find -mindepth 2 -maxdepth 2 -type d | xargs rm -rf
|
|
cd ..
|
|
mv reports/* .
|
|
rmdir reports
|
|
- name: upload benchmark data to the website
|
|
env:
|
|
SSHKEY: ${{ secrets.ACTIONS_TESTS_DATA_DEPLOY_KEY }}
|
|
run: |
|
|
echo "$SSHKEY" >~/github_key
|
|
chmod 600 ~/github_key
|
|
export GIT_SSH_COMMAND="ssh -i ~/github_key"
|
|
|
|
git clone git@github.com:RustPython/rustpython.github.io.git website
|
|
cd website
|
|
rm -rf ./assets/criterion
|
|
cp -r ../target/criterion ./assets/criterion
|
|
git add ./assets/criterion
|
|
if git -c user.name="Github Actions" -c user.email="actions@github.com" commit -m "Update benchmark results"; then
|
|
git push
|
|
fi
|