Fix(cicd): add html pipeline.
This commit is contained in:
parent
ff9950a89d
commit
8c14f678aa
12 changed files with 84 additions and 38 deletions
|
@ -1,6 +1,3 @@
|
|||
[target.x86_64-unknown-linux-gnu]
|
||||
linker = "clang"
|
||||
rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold", "-Zshare-generics=y"]
|
||||
|
||||
[target.wasm32-unknown-unknown]
|
||||
runner = "wasm-server-runner"
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
when:
|
||||
- event: [pull_request]
|
||||
|
||||
steps:
|
||||
clippy:
|
||||
image: git.ragarock.moe/silvana/yuno/rust:latest
|
||||
environment: [CARGO_TERM_COLOR=always, CARGO_HOME=./.cargo-home]
|
||||
commands:
|
||||
- rustup default nightly
|
||||
- rustup component add clippy
|
||||
- cargo clippy -- -D warnings
|
|
@ -1,11 +0,0 @@
|
|||
when:
|
||||
- event: [pull_request]
|
||||
|
||||
steps:
|
||||
fmt:
|
||||
image: git.ragarock.moe/silvana/yuno/rust:latest
|
||||
environment: [CARGO_TERM_COLOR=always, CARGO_HOME=./.cargo-home]
|
||||
commands:
|
||||
- rustup default nightly
|
||||
- rustup component add rustfmt
|
||||
- cargo fmt -- --check
|
17
.woodpecker/html.yml
Normal file
17
.woodpecker/html.yml
Normal file
|
@ -0,0 +1,17 @@
|
|||
when:
|
||||
- event: [tag]
|
||||
|
||||
steps:
|
||||
build:
|
||||
image: git.ragarock.moe/silvana/yuno/rust:latest
|
||||
environment: [CARGO_TERM_COLOR=always, CARGO_HOME=./.cargo-home]
|
||||
commands:
|
||||
- rustup default nightly
|
||||
- rustup target add wasm32-unknown-unknown
|
||||
- trunk build --public-url
|
||||
upload:
|
||||
image: minio/mc
|
||||
secrets: [access_key, secret_key]
|
||||
commands:
|
||||
- mc alias set minio https://minio.ragarock.moe $access_key $secret_key
|
||||
- mc cp -quiet --recursive dist/ minio/yuno/${CI_COMMIT_TAG}/
|
25
.woodpecker/quality.yml
Normal file
25
.woodpecker/quality.yml
Normal file
|
@ -0,0 +1,25 @@
|
|||
when:
|
||||
- event: [pull_request]
|
||||
|
||||
steps:
|
||||
fmt:
|
||||
image: git.ragarock.moe/silvana/yuno/rust:latest
|
||||
environment: [CARGO_TERM_COLOR=always, CARGO_HOME=./.cargo-home]
|
||||
commands:
|
||||
- rustup default nightly
|
||||
- rustup component add rustfmt
|
||||
- cargo fmt -- --check
|
||||
clippy:
|
||||
image: git.ragarock.moe/silvana/yuno/rust:latest
|
||||
environment: [CARGO_TERM_COLOR=always, CARGO_HOME=./.cargo-home]
|
||||
commands:
|
||||
- rustup default nightly
|
||||
- rustup component add clippy
|
||||
- cargo clippy -- -D warnings
|
||||
test:
|
||||
image: git.ragarock.moe/silvana/yuno/rust:latest
|
||||
environment: [CARGO_TERM_COLOR=always, CARGO_HOME=./.cargo-home]
|
||||
commands:
|
||||
- rustup default nightly
|
||||
- cargo check
|
||||
- cargo test
|
|
@ -1,11 +0,0 @@
|
|||
when:
|
||||
- event: [pull_request]
|
||||
|
||||
steps:
|
||||
test:
|
||||
image: git.ragarock.moe/silvana/yuno/rust:latest
|
||||
environment: [CARGO_TERM_COLOR=always, CARGO_HOME=./.cargo-home]
|
||||
commands:
|
||||
- rustup default nightly
|
||||
- cargo check
|
||||
- cargo test
|
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -4517,7 +4517,6 @@ dependencies = [
|
|||
"bevy_kira_audio",
|
||||
"image",
|
||||
"log",
|
||||
"rand",
|
||||
"webbrowser",
|
||||
"winit",
|
||||
]
|
||||
|
|
|
@ -60,7 +60,6 @@ bevy = { version = "0.14", default-features = false, features = [
|
|||
] }
|
||||
bevy_kira_audio = { version = "0.20" }
|
||||
bevy_asset_loader = { version = "0.21", features = ["2d"] }
|
||||
rand = { version = "0.8.3" }
|
||||
webbrowser = { version = "1", features = ["hardened"] }
|
||||
|
||||
# keep the following in sync with Bevy's dependencies
|
||||
|
|
|
@ -7,6 +7,7 @@ WORKDIR /app
|
|||
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs --output init-rust.sh \
|
||||
&& chmod a+x init-rust.sh \
|
||||
&& ./init-rust.sh -y \
|
||||
&& /root/.cargo/bin/rustup target add wasm32-unknown-unknown \
|
||||
&& /root/.cargo/bin/cargo install trunk
|
||||
|
||||
ENV PATH="/root/.cargo/bin:$PATH"
|
||||
|
|
5
Trunk.toml
Normal file
5
Trunk.toml
Normal file
|
@ -0,0 +1,5 @@
|
|||
[build]
|
||||
public_url = "./"
|
||||
|
||||
[serve]
|
||||
port = 8080
|
|
@ -12,11 +12,43 @@ body {
|
|||
}
|
||||
|
||||
.game-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.lds-dual-ring {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
.lds-dual-ring:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
border-radius: 50%;
|
||||
border: 6px solid #fff;
|
||||
border-color: #fff transparent #fff transparent;
|
||||
animation: lds-dual-ring 1.2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes lds-dual-ring {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
#bevy {
|
||||
z-index: 2;
|
||||
}
|
||||
|
|
|
@ -10,5 +10,9 @@
|
|||
</head>
|
||||
<body>
|
||||
<link data-trunk rel="inline" href="html/sound.js" />
|
||||
<div class="game-container">
|
||||
<div class="lds-dual-ring"></div>
|
||||
<canvas id="bevy"> Javascript and support for canvas is required </canvas>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue