Merge pull request #3365 from fanninpm/fix-cron-ci-jobs

Fix `cron-ci.yaml` actions
This commit is contained in:
Noa
2021-10-25 00:37:32 -05:00
committed by GitHub
2 changed files with 18 additions and 5 deletions

View File

@@ -5,6 +5,9 @@ on:
name: Periodic checks/tasks
env:
CARGO_ARGS: --features ssl,jit
jobs:
codecov:
name: Collect code coverage data
@@ -16,11 +19,11 @@ jobs:
toolchain: nightly
override: true
components: llvm-tools-preview
- run: sudo apt-get install lcov
- run: sudo apt-get update && sudo apt-get -y install lcov
- uses: actions-rs/cargo@v1
with:
command: build
args: --release --verbose
args: --release --verbose ${{ env.CARGO_ARGS }}
env:
RUSTC_WRAPPER: './scripts/codecoverage-rustc-wrapper.sh'
- uses: actions/setup-python@v2
@@ -38,8 +41,6 @@ jobs:
working-directory: ./extra_tests
- name: run cpython tests
run: LLVM_PROFILE_FILE="$PWD/regrtest.profraw" target/release/rustpython -m test -v
env:
RUSTPYTHONPATH: ${{ github.workspace }}/Lib
- name: prepare code coverage data
run: |
rusttool() {
@@ -58,6 +59,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- name: build rustpython
uses: actions-rs/cargo@v1
with:
@@ -88,6 +90,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- name: build rustpython
uses: actions-rs/cargo@v1
with:
@@ -121,6 +124,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: cargo install cargo-criterion
- name: build benchmarks
run: cargo build --release --benches

View File

@@ -114,7 +114,13 @@ fn bench_rustpy_code(group: &mut BenchmarkGroup<WallTime>, bench: &MicroBenchmar
settings.dont_write_bytecode = true;
settings.no_user_site = true;
Interpreter::new(settings, InitParameter::External).enter(|vm| {
Interpreter::new_with_init(settings, |vm| {
for (name, init) in rustpython_stdlib::get_module_inits().into_iter() {
vm.add_native_module(name, init);
}
InitParameter::External
})
.enter(|vm| {
let setup_code = vm
.compile(&bench.setup, Mode::Exec, bench.name.to_owned())
.expect("Error compiling setup code");