Skip to content

Commit 7d628cf

Browse files
committed
chore: copy configuration, README and license from main
1 parent 3b54188 commit 7d628cf

File tree

8 files changed

+1079
-0
lines changed

8 files changed

+1079
-0
lines changed

Diff for: .github/dependabot.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
# Maintain dependencies for GitHub Actions
9+
- package-ecosystem: 'github-actions'
10+
directory: '/'
11+
schedule:
12+
interval: 'daily'
13+
14+
# Maintain dependencies for Cargo
15+
- package-ecosystem: 'cargo'
16+
directory: '/'
17+
schedule:
18+
interval: 'daily'

Diff for: .github/workflows/rust-build.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Build binaries for UNM
2+
3+
on:
4+
push:
5+
workflow_dispatch:
6+
7+
jobs:
8+
cargo-build:
9+
runs-on: ${{ matrix.os }}
10+
strategy:
11+
matrix:
12+
include:
13+
- os: windows-latest
14+
target: x86_64-pc-windows-msvc
15+
- os: macos-11
16+
target: x86_64-apple-darwin
17+
- os: macos-11
18+
target: aarch64-apple-darwin
19+
- os: ubuntu-latest
20+
target: x86_64-unknown-linux-gnu
21+
steps:
22+
- uses: actions/checkout@v2
23+
- uses: actions-rs/toolchain@v1
24+
with:
25+
toolchain: beta
26+
target: ${{ matrix.target }}
27+
- uses: actions/cache@v2
28+
with:
29+
path: |
30+
~/.cargo/bin/
31+
~/.cargo/registry/index/
32+
~/.cargo/registry/cache/
33+
~/.cargo/git/db/
34+
target/
35+
key: v0-${{ matrix.os }}-${{ matrix.target }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
36+
restore-keys: |
37+
v0-${{ matrix.os }}-${{ matrix.target }}-cargo-build-${{ hashFiles('**/Cargo.lock') }}
38+
v0-${{ matrix.os }}-${{ matrix.target }}-cargo-build-
39+
- uses: actions-rs/cargo@v1
40+
with:
41+
use-cross: true
42+
command: build
43+
args: --target ${{ matrix.target }}
44+
- uses: actions/upload-artifact@v2
45+
with:
46+
name: unm-server-${{ matrix.os }}-${{ matrix.target }}
47+
path: |
48+
./target/${{ matrix.target }}/debug/*unm_server*

Diff for: .github/workflows/rust-check.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Check if the code can build
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
cargo-check:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions-rs/toolchain@v1
14+
with:
15+
toolchain: beta
16+
- uses: actions/cache@v2
17+
with:
18+
path: |
19+
~/.cargo/bin/
20+
~/.cargo/registry/index/
21+
~/.cargo/registry/cache/
22+
~/.cargo/git/db/
23+
target/
24+
key: v0-${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.lock') }}
25+
restore-keys: |
26+
v0-${{ runner.os }}-cargo-check-${{ hashFiles('**/Cargo.lock') }}
27+
v0-${{ runner.os }}-cargo-check-
28+
v0-${{ runner.os }}-cargo-
29+
- uses: actions-rs/cargo@v1
30+
with:
31+
command: check
32+
33+
cargo-test:
34+
needs: cargo-check
35+
runs-on: ${{ matrix.os }}
36+
strategy:
37+
matrix:
38+
os:
39+
- windows-latest
40+
- ubuntu-latest
41+
- macos-11
42+
steps:
43+
- uses: actions/checkout@v2
44+
- uses: actions-rs/toolchain@v1
45+
with:
46+
toolchain: beta
47+
- uses: actions/cache@v2
48+
with:
49+
path: |
50+
~/.cargo/bin/
51+
~/.cargo/registry/index/
52+
~/.cargo/registry/cache/
53+
~/.cargo/git/db/
54+
target/
55+
key: v0-${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
56+
restore-keys: |
57+
v0-${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
58+
v0-${{ runner.os }}-cargo-test-
59+
v0-${{ runner.os }}-cargo-
60+
- uses: actions-rs/cargo@v1
61+
with:
62+
command: test
63+
args: -p unm_server
64+
- uses: actions-rs/cargo@v1
65+
with:
66+
command: test
67+
args: -p unm_macro

Diff for: .github/workflows/rust-fmt.yml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Check if the code has formatted
2+
3+
on:
4+
push:
5+
pull_request:
6+
workflow_dispatch:
7+
8+
jobs:
9+
cargo-fmt:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions-rs/toolchain@v1
14+
with:
15+
toolchain: beta
16+
- uses: actions-rs/cargo@v1
17+
with:
18+
command: fmt
19+
args: -- --check
20+
21+
cargo-clippy:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions-rs/toolchain@v1
26+
with:
27+
toolchain: beta
28+
- uses: actions/cache@v2
29+
with:
30+
path: |
31+
~/.cargo/bin/
32+
~/.cargo/registry/index/
33+
~/.cargo/registry/cache/
34+
~/.cargo/git/db/
35+
target/
36+
key: v0-${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
37+
restore-keys: |
38+
v0-${{ runner.os }}-cargo-clippy-${{ hashFiles('**/Cargo.lock') }}
39+
v0-${{ runner.os }}-cargo-clippy
40+
v0-${{ runner.os }}-cargo-
41+
- uses: actions-rs/cargo@v1
42+
with:
43+
command: clippy

0 commit comments

Comments
 (0)