Skip to content

Commit

Permalink
Fixing nightly crate validator workflows (risc0#522)
Browse files Browse the repository at this point in the history
* Moves benchmarking tool to private fork and fix crate-validation calls to cargo-risczero
  • Loading branch information
mothran authored Apr 25, 2023
1 parent 11eb0f9 commit 8a0ec09
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ jobs:
target/release/main \
-p ${{ runner.temp }}/crate-validation/profiles.json \
-j ${{ runner.temp }}/crate-validation/profile-results.json &> ${{ runner.temp }}/crate-validation/crate-results.log
# &> ${{ runner.temp }}/crate-validation/crate-results.log
shell: bash
working-directory: tools/crates-validator/

Expand All @@ -55,6 +54,7 @@ jobs:

- name: Upload artifact results
uses: actions/upload-artifact@v3
if: always() # upload all artifacts even on failures
with:
name: crates-test-results
path: ${{ runner.temp }}/crate-validation/
Expand Down
18 changes: 12 additions & 6 deletions tools/crates-validator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@
// See the License for the specific language governing permissions and
// limitations under the License.

use std::cell::RefCell;
use std::collections::BTreeMap;
use std::fs::File;
use std::io::{BufRead, BufReader, Write};
use std::path::{Path, PathBuf};
use std::process::Command;
use std::{
cell::RefCell,
collections::BTreeMap,
fs::File,
io::{BufRead, BufReader, Write},
path::{Path, PathBuf},
process::Command,
};

use anyhow::{bail, Context, Result};
use handlebars::Handlebars;
Expand Down Expand Up @@ -233,6 +235,10 @@ impl Validator {
}
cmd.arg("--template");
cmd.arg(r0_template_path);
cmd.arg("--templ-subdir");
cmd.arg("");
cmd.arg("--path");
cmd.arg(r0_path);
} else if let Some(branch) = &self.context.risc0_gh_branch {
cmd.arg("--branch");
cmd.arg(branch);
Expand Down

0 comments on commit 8a0ec09

Please sign in to comment.