mirror of
https://github.com/Noratrieb/does-it-build.git
synced 2026-01-14 10:25:01 +01:00
Support using custom rustflags for targets
This is necessary for AVR and AMDGPU. We currently just hardcode some flags in the binary, which is good enough. There's a new column which keeps track of the used flags and shows them for a build. A migration makes sure that the older results are properly backfilled with the flags to make them build.
This commit is contained in:
parent
42cd9fda83
commit
b1d1728c42
5 changed files with 81 additions and 19 deletions
32
src/web.rs
32
src/web.rs
|
|
@ -41,6 +41,19 @@ struct BuildQuery {
|
|||
}
|
||||
|
||||
async fn web_build(State(state): State<AppState>, Query(query): Query<BuildQuery>) -> Response {
|
||||
use askama::Template;
|
||||
#[derive(askama::Template)]
|
||||
#[template(path = "build.html")]
|
||||
struct BuildPage {
|
||||
nightly: String,
|
||||
target: String,
|
||||
stderr: String,
|
||||
mode: BuildMode,
|
||||
rustflags: Option<String>,
|
||||
version: &'static str,
|
||||
status: Status,
|
||||
}
|
||||
|
||||
match state
|
||||
.db
|
||||
.build_status_full(
|
||||
|
|
@ -51,15 +64,16 @@ async fn web_build(State(state): State<AppState>, Query(query): Query<BuildQuery
|
|||
.await
|
||||
{
|
||||
Ok(Some(build)) => {
|
||||
let page = include_str!("../static/build.html")
|
||||
.replace("{{nightly}}", &query.nightly)
|
||||
.replace("{{target}}", &query.target)
|
||||
.replace("{{stderr}}", &build.stderr)
|
||||
.replace("{{mode}}", &build.mode.to_string())
|
||||
.replace("{{version}}", crate::VERSION)
|
||||
.replace("{{status}}", &build.status.to_string());
|
||||
|
||||
Html(page).into_response()
|
||||
let page = BuildPage {
|
||||
nightly: query.nightly,
|
||||
target: query.target,
|
||||
stderr: build.stderr,
|
||||
mode: build.mode,
|
||||
rustflags: build.rustflags,
|
||||
version: crate::VERSION,
|
||||
status: build.status,
|
||||
};
|
||||
Html(page.render().unwrap()).into_response()
|
||||
}
|
||||
Ok(None) => StatusCode::NOT_FOUND.into_response(),
|
||||
Err(err) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue