Skip to content

Commit a1ae696

Browse files
committed
Switch to GitHub Actions
Uses Rust actions from https://github.com/actions-rs
1 parent 5225653 commit a1ae696

13 files changed

+548
-110
lines changed

Diff for: .github/workflows/ecdsa.yml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: ecdsa
2+
on:
3+
pull_request:
4+
paths:
5+
- "ecdsa/**"
6+
- "Cargo.*"
7+
push:
8+
branches: master
9+
paths:
10+
- "ecdsa/**"
11+
- "Cargo.*"
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
target:
19+
- thumbv7em-none-eabi
20+
- wasm32-unknown-unknown
21+
toolchain:
22+
- 1.40.0 # MSRV
23+
- stable
24+
steps:
25+
- name: Checkout sources
26+
uses: actions/checkout@v1
27+
28+
- name: Cache cargo registry
29+
uses: actions/cache@v1
30+
with:
31+
path: ~/.cargo/registry
32+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
33+
34+
- name: Cache cargo index
35+
uses: actions/cache@v1
36+
with:
37+
path: ~/.cargo/git
38+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
39+
40+
- name: Cache cargo build
41+
uses: actions/cache@v1
42+
with:
43+
path: target
44+
key: ${{ runner.os }}-rust-${{ matrix.toolchain }}-${{ matrix.target }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
45+
46+
- name: Install toolchain
47+
uses: actions-rs/toolchain@v1
48+
with:
49+
target: ${{ matrix.target }}
50+
toolchain: ${{ matrix.toolchain }}
51+
override: true
52+
53+
- name: Run cargo build --no-default-features
54+
working-directory: ecdsa
55+
env:
56+
CARGO_INCREMENTAL: 0
57+
RUSTFLAGS: -D warnings
58+
run: cargo build --no-default-features --release --target ${{ matrix.target }}
59+
60+
test:
61+
strategy:
62+
matrix:
63+
platform:
64+
- ubuntu-latest
65+
- macos-latest
66+
- windows-latest
67+
toolchain:
68+
- 1.40.0 # MSRV
69+
- stable
70+
runs-on: ${{ matrix.platform }}
71+
steps:
72+
- name: Checkout sources
73+
uses: actions/checkout@v1
74+
75+
- name: Cache cargo registry
76+
uses: actions/cache@v1
77+
with:
78+
path: ~/.cargo/registry
79+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
80+
81+
- name: Cache cargo index
82+
uses: actions/cache@v1
83+
with:
84+
path: ~/.cargo/git
85+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
86+
87+
- name: Cache cargo build
88+
uses: actions/cache@v1
89+
with:
90+
path: target
91+
key: ${{ runner.os }}-rust-${{ matrix.toolchain }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
92+
93+
- name: Install toolchain
94+
uses: actions-rs/toolchain@v1
95+
with:
96+
toolchain: ${{ matrix.toolchain }}
97+
override: true
98+
99+
- name: Run cargo test --lib
100+
working-directory: ecdsa
101+
env:
102+
CARGO_INCREMENTAL: 0
103+
RUSTFLAGS: -D warnings
104+
run: cargo test --lib --release
105+
106+
- name: Run cargo test --all-features
107+
working-directory: ecdsa
108+
env:
109+
CARGO_INCREMENTAL: 0
110+
RUSTFLAGS: -D warnings
111+
run: cargo test --all-features --release

Diff for: .github/workflows/ed25519.yml

+111
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: ed25519
2+
on:
3+
pull_request:
4+
paths:
5+
- "ed25519/**"
6+
- "Cargo.*"
7+
push:
8+
branches: master
9+
paths:
10+
- "ed25519/**"
11+
- "Cargo.*"
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
target:
19+
- thumbv7em-none-eabi
20+
- wasm32-unknown-unknown
21+
toolchain:
22+
- 1.40.0 # MSRV
23+
- stable
24+
steps:
25+
- name: Checkout sources
26+
uses: actions/checkout@v1
27+
28+
- name: Cache cargo registry
29+
uses: actions/cache@v1
30+
with:
31+
path: ~/.cargo/registry
32+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
33+
34+
- name: Cache cargo index
35+
uses: actions/cache@v1
36+
with:
37+
path: ~/.cargo/git
38+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
39+
40+
- name: Cache cargo build
41+
uses: actions/cache@v1
42+
with:
43+
path: target
44+
key: ${{ runner.os }}-rust-${{ matrix.toolchain }}-${{ matrix.target }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
45+
46+
- name: Install toolchain
47+
uses: actions-rs/toolchain@v1
48+
with:
49+
target: ${{ matrix.target }}
50+
toolchain: ${{ matrix.toolchain }}
51+
override: true
52+
53+
- name: Run cargo build --no-default-features
54+
working-directory: ed25519
55+
env:
56+
CARGO_INCREMENTAL: 0
57+
RUSTFLAGS: -D warnings
58+
run: cargo build --no-default-features --release --target ${{ matrix.target }}
59+
60+
test:
61+
strategy:
62+
matrix:
63+
platform:
64+
- ubuntu-latest
65+
- macos-latest
66+
- windows-latest
67+
toolchain:
68+
- 1.40.0 # MSRV
69+
- stable
70+
runs-on: ${{ matrix.platform }}
71+
steps:
72+
- name: Checkout sources
73+
uses: actions/checkout@v1
74+
75+
- name: Cache cargo registry
76+
uses: actions/cache@v1
77+
with:
78+
path: ~/.cargo/registry
79+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
80+
81+
- name: Cache cargo index
82+
uses: actions/cache@v1
83+
with:
84+
path: ~/.cargo/git
85+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
86+
87+
- name: Cache cargo build
88+
uses: actions/cache@v1
89+
with:
90+
path: target
91+
key: ${{ runner.os }}-rust-${{ matrix.toolchain }}-cargo-build-target-${{ hashFiles('Cargo.lock') }}
92+
93+
- name: Install toolchain
94+
uses: actions-rs/toolchain@v1
95+
with:
96+
toolchain: ${{ matrix.toolchain }}
97+
override: true
98+
99+
- name: Run cargo test --lib
100+
working-directory: ed25519
101+
env:
102+
CARGO_INCREMENTAL: 0
103+
RUSTFLAGS: -D warnings
104+
run: cargo test --lib --release
105+
106+
- name: Run cargo test --all-features
107+
working-directory: ed25519
108+
env:
109+
CARGO_INCREMENTAL: 0
110+
RUSTFLAGS: -D warnings
111+
run: cargo test --all-features --release

Diff for: .github/workflows/security-audit.yml

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Security Audit
2+
on:
3+
pull_request:
4+
paths: Cargo.lock
5+
push:
6+
branches: develop
7+
paths: Cargo.lock
8+
schedule:
9+
- cron: '0 0 * * *'
10+
11+
jobs:
12+
security_audit:
13+
name: Security Audit
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v1
17+
- name: Cache cargo bin
18+
uses: actions/cache@v1
19+
with:
20+
path: ~/.cargo/bin
21+
key: ${{ runner.os }}-cargo-audit-v0.11.2
22+
- uses: actions-rs/audit-check@v1
23+
with:
24+
token: ${{ secrets.GITHUB_TOKEN }}

Diff for: .github/workflows/workspace.yml

+88
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
name: Workspace
2+
on:
3+
pull_request:
4+
paths-ignore:
5+
- README.md
6+
push:
7+
branches: master
8+
paths-ignore:
9+
- README.md
10+
11+
jobs:
12+
rustfmt:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout sources
16+
uses: actions/checkout@v1
17+
18+
- name: Install stable toolchain
19+
uses: actions-rs/toolchain@v1
20+
with:
21+
profile: minimal
22+
toolchain: stable
23+
components: rustfmt
24+
25+
- name: Run cargo fmt
26+
uses: actions-rs/cargo@v1
27+
with:
28+
command: fmt
29+
args: --all -- --check
30+
clippy:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v1
34+
- uses: actions-rs/toolchain@v1
35+
with:
36+
profile: minimal
37+
toolchain: stable
38+
components: clippy
39+
- run: cargo clippy --all-features -- -D warnings
40+
41+
codecov:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- name: Checkout repository
45+
uses: actions/checkout@v2
46+
47+
- name: Cache cargo registry
48+
uses: actions/cache@v1
49+
with:
50+
path: ~/.cargo/registry
51+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
52+
53+
- name: Cache cargo index
54+
uses: actions/cache@v1
55+
with:
56+
path: ~/.cargo/git
57+
key: ${{ runner.os }}-cargo-index-${{ hashFiles('Cargo.lock') }}
58+
59+
- name: Cache cargo build
60+
uses: actions/cache@v1
61+
with:
62+
path: target
63+
key: ${{ runner.os }}-coverage-cargo-build-target-${{ hashFiles('Cargo.lock') }}
64+
65+
- name: Install stable toolchain
66+
uses: actions-rs/toolchain@v1
67+
with:
68+
toolchain: stable
69+
override: true
70+
71+
- name: Run cargo-tarpaulin
72+
uses: actions-rs/[email protected]
73+
env:
74+
CARGO_INCREMENTAL: 0
75+
with:
76+
version: 0.11.0
77+
args: --all --exclude armistice_usbarmory -- --test-threads 1
78+
79+
- name: Upload to codecov.io
80+
uses: codecov/[email protected]
81+
with:
82+
token: ${{secrets.CODECOV_TOKEN}}
83+
84+
- name: Archive code coverage results
85+
uses: actions/upload-artifact@v1
86+
with:
87+
name: code-coverage-report
88+
path: cobertura.xml

Diff for: .gitignore

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
Cargo.lock
21
target
3-
*.sw*
2+
*.swp

Diff for: .travis.yml

-44
This file was deleted.

0 commit comments

Comments
 (0)