Skip to content

Commit

Permalink
Merge pull request #4 from SpectrumXYZ/more-actions
Browse files Browse the repository at this point in the history
Update workflows and copyright date
  • Loading branch information
Ancient123 authored Jan 5, 2022
2 parents 02b302b + 193c697 commit 408f79e
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 44 deletions.
3 changes: 2 additions & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.DS_Store
Cargo.lock
Dockerfile
target
target
.github/
11 changes: 11 additions & 0 deletions .github/dependabot.yml
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"
42 changes: 34 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

Expand All @@ -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
29 changes: 0 additions & 29 deletions .gitlab-ci.yml

This file was deleted.

8 changes: 6 additions & 2 deletions Dockerfile
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
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BSD 2-Clause License

Copyright © 2021 Translucence Research, Inc. All rights reserved.
Copyright © 2022 Translucence Research, Inc. All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2021 Translucence Research, Inc. All rights reserved.
# Copyright © 2022 Translucence Research, Inc. All rights reserved.

.PHONY: build
build:
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2021 Translucence Research, Inc. All rights reserved.
// Copyright © 2022 Translucence Research, Inc. All rights reserved.

//! User-oriented format for binary data. Tagged Base64 is intended to
//! be used in user interfaces including URLs and text to be copied
Expand Down
2 changes: 1 addition & 1 deletion tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2021 Translucence Research, Inc. All rights reserved.
// Copyright © 2022 Translucence Research, Inc. All rights reserved.

//! Test suite for the Web and headless browsers.
Expand Down

0 comments on commit 408f79e

Please sign in to comment.