-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from SpectrumXYZ/more-actions
Update workflows and copyright date
- Loading branch information
Showing
9 changed files
with
57 additions
and
44 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
.DS_Store | ||
Cargo.lock | ||
Dockerfile | ||
target | ||
target | ||
.github/ |
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,11 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
|
||
- package-ecosystem: "cargo" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" |
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 |
---|---|---|
|
@@ -2,20 +2,25 @@ name: Build | |
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '0 0 * * 1' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: self-hosted | ||
container: | ||
image: rust:buster | ||
image: registry.gitlab.com/asuran-rs/containers/rust-sccache-docker:1.56 | ||
steps: | ||
- uses: styfle/[email protected] | ||
name: Cancel Outdated Builds | ||
with: | ||
all_but_latest: true | ||
access_token: ${{ github.token }} | ||
|
||
- name: Install firefox-esr | ||
run: apt-get update && apt-get install -y firefox-esr && rm -rf /var/lib/apt/lists/* | ||
|
||
|
@@ -25,11 +30,32 @@ jobs: | |
- uses: Swatinem/rust-cache@v1 | ||
name: Enable Rust Caching | ||
|
||
- name: Install wasm-pack | ||
run: cargo install wasm-pack | ||
- name: Install wasm-pack binary | ||
run: | | ||
wget -O wasm.tar.gz https://github.com/rustwasm/wasm-pack/releases/download/v0.10.2/wasm-pack-v0.10.2-x86_64-unknown-linux-musl.tar.gz | ||
tar -xvf wasm.tar.gz | ||
mv wasm*/wasm-pack /usr/bin/ | ||
- name: Disable cargo options | ||
# delete cargo config so default linker is used | ||
run: rm /opt/.cargo/config | ||
|
||
- name: Build | ||
- name: Clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ github.token }} | ||
|
||
- name: Audit | ||
uses: actions-rs/audit-check@v1 | ||
with: | ||
token: ${{ github.token }} | ||
|
||
- name: Cargo Build | ||
run: cargo build | ||
|
||
- name: Test | ||
run: cargo test | ||
- name: Cargo Test | ||
run: cargo test --verbose -- -Zunstable-options --report-time | ||
|
||
- name: Web Test | ||
# $HOME has to match running user (root) | ||
run: HOME=/root wasm-pack test --headless --firefox |
This file was deleted.
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 |
---|---|---|
@@ -1,9 +1,13 @@ | ||
FROM rust:buster as builder | ||
FROM registry.gitlab.com/asuran-rs/containers/rust-sccache-docker:1.56 as builder | ||
RUN apt-get update && apt-get install -y firefox-esr && rm -rf /var/lib/apt/lists/* | ||
RUN mkdir /app | ||
WORKDIR /app/ | ||
COPY . /app/ | ||
RUN cargo install wasm-pack | ||
RUN wget -O wasm.tar.gz https://github.com/rustwasm/wasm-pack/releases/download/v0.10.2/wasm-pack-v0.10.2-x86_64-unknown-linux-musl.tar.gz ; \ | ||
tar -xvf wasm.tar.gz ; \ | ||
rm wasm.tar.gz ; \ | ||
mv wasm*/wasm-pack /usr/bin/ | ||
RUN rm /opt/.cargo/config | ||
RUN cargo build | ||
RUN cargo test | ||
RUN wasm-pack test --headless --firefox |
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
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
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
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