mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Merge pull request #3365 from fanninpm/fix-cron-ci-jobs
Fix `cron-ci.yaml` actions
This commit is contained in:
15
.github/workflows/cron-ci.yaml
vendored
15
.github/workflows/cron-ci.yaml
vendored
@@ -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
|
||||
|
||||
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user