This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bisect job for comment id 623120871 (bjorn3/cargo-bisect-rustc-bot#1)
- Loading branch information
0 parents
commit 876721d
Showing
6 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
name: Bisect | ||
|
||
on: | ||
- push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# https://github.com/actions/cache/issues/133 | ||
- name: Fixup owner of ~/.cargo/ | ||
# Don't remove the trailing /. It is necessary to follow the symlink. | ||
run: sudo chown -R $(whoami):$(id -ng) ~/.cargo/ | ||
|
||
- name: Cache cargo installed crates | ||
uses: actions/cache@v1.1.2 | ||
with: | ||
path: ~/.cargo/bin | ||
key: cargo-installed-crates | ||
|
||
- run: cargo install cargo-bisect-rustc || true | ||
|
||
- name: Bisect | ||
run: cargo bisect-rustc "--start=2020-04-26" "--end=2020-04-28" | grep -v "for x86_64-unknown-linux-gnu" | tee log.txt | ||
|
||
- name: Upload log | ||
run: curl -T log.txt -X POST $WEBHOOK/?upload_log=1 | ||
env: | ||
WEBHOOK: ${{ secrets.WEBHOOK }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/target |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[package] | ||
name = "cargo-bisect-bot" | ||
version = "0.1.0" | ||
authors = ["bjorn3 <bjorn3@users.noreply.github.com>"] | ||
edition = "2018" | ||
|
||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | ||
|
||
[dependencies] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
use std::sync::{Arc, RwLock}; | ||
|
||
#[derive(Copy, Clone)] | ||
pub struct Glfw; | ||
|
||
fn fun_call<T>(val: T) -> T { val } | ||
|
||
static mut GLFW: Option<Glfw> = None; | ||
pub fn new() -> Result<Arc<RwLock<Glfw>>, Box<dyn std::error::Error>> { | ||
//TODO: Give the option to choose FAIL / LOG? | ||
let glfw = unsafe { if let Some(glfw) = GLFW { | ||
glfw | ||
} else { | ||
let glfw = fun_call(Glfw); | ||
GLFW = Some(glfw); | ||
glfw | ||
}}; | ||
|
||
Ok(Arc::new(RwLock::new(glfw))) | ||
} |