Skip to content

Commit b43dbaf

Browse files
committed
chore: re-start the project
1 parent a9d74e6 commit b43dbaf

40 files changed

+585
-4865
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# These are supported funding model platforms
22

3-
github: [dr-orlovsky]
3+
github: [dr-orlovsky, cyphernet]

.github/workflows/build.yml

Lines changed: 38 additions & 166 deletions
Original file line numberDiff line numberDiff line change
@@ -2,194 +2,66 @@ name: Build
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches:
6+
- master
7+
tags:
8+
- 'v[0-9]+.*'
69
pull_request:
7-
branches: [ master ]
10+
branches:
11+
- master
12+
- develop
13+
- 'v[0-9]+.?*'
814

915
env:
1016
CARGO_TERM_COLOR: always
1117

1218
jobs:
19+
default:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
- uses: dtolnay/rust-toolchain@stable
24+
- run: cargo check --workspace
25+
no-default:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: dtolnay/rust-toolchain@stable
30+
- run: cargo check --workspace --no-default-features
1331
features:
1432
runs-on: ubuntu-latest
1533
strategy:
1634
fail-fast: false
1735
matrix:
18-
feature:
19-
- server
20-
- client
21-
- embedded
22-
- cli
23-
- server,serde
24-
- client,serde
25-
- tor
26-
- tor,cli
27-
- tor,embedded
28-
- tor,server
36+
feature: [ log ]
2937
steps:
30-
- uses: actions/checkout@v2
31-
- name: Install rust stable
32-
uses: actions-rs/toolchain@v1
33-
with:
34-
toolchain: stable
35-
override: true
36-
- name: Feature ${{ matrix.feature }}
37-
uses: actions-rs/cargo@v1
38-
with:
39-
command: check
40-
args: --no-default-features --features=${{ matrix.feature }}
41-
- name: Defaults + ${{ matrix.feature }}
42-
uses: actions-rs/cargo@v1
43-
with:
44-
command: check
45-
args: --features=${{ matrix.feature }}
38+
- uses: actions/checkout@v4
39+
- uses: dtolnay/rust-toolchain@stable
40+
- name: Feature ${{matrix.feature}}
41+
run: cargo check --workspace --no-default-features --features=${{matrix.feature}}
42+
- name: Feature ${{matrix.feature}}
43+
run: cargo check --workspace --features=${{matrix.feature}}
4644
platforms:
4745
runs-on: ${{ matrix.os }}
4846
strategy:
4947
fail-fast: false
5048
matrix:
51-
os: [ ubuntu-20.04, ubuntu-22.04, macos-11, macos-12, windows-2019, windows-2022 ]
49+
os: [ ubuntu-22.04, ubuntu-latest, macos-13, macos-latest, windows-2019, windows-latest ]
5250
steps:
53-
- uses: actions/checkout@v2
54-
- name: Install rust stable
55-
uses: actions-rs/toolchain@v1
56-
with:
57-
toolchain: stable
58-
override: true
59-
- name: Build with no features
60-
uses: actions-rs/cargo@v1
61-
with:
62-
command: check
63-
args: --no-default-features
64-
- name: Build with defaults
65-
uses: actions-rs/cargo@v1
66-
with:
67-
command: check
68-
args: --all-features
51+
- uses: actions/checkout@v4
52+
- uses: dtolnay/rust-toolchain@stable
53+
- name: Platform ${{matrix.os}}
54+
run: cargo check --workspace --all-features # we skip test targets here to be sure that the main library can be built
6955
toolchains:
7056
runs-on: ubuntu-latest
7157
strategy:
7258
fail-fast: false
7359
matrix:
74-
toolchain: [ nightly, beta, stable, 1.59.0 ]
60+
toolchain: [ nightly, beta, stable, 1.85.0 ]
7561
steps:
76-
- uses: actions/checkout@v2
77-
- name: Install rust ${{ matrix.toolchain }}
78-
uses: actions-rs/toolchain@v1
79-
with:
80-
toolchain: ${{ matrix.toolchain }}
81-
override: true
82-
- name: All features
83-
uses: actions-rs/cargo@v1
84-
with:
85-
command: check
86-
args: --workspace --all-targets --all-features
87-
dependency:
88-
runs-on: ubuntu-latest
89-
steps:
90-
- uses: actions/checkout@v2
91-
- name: Install latest stable
92-
uses: actions-rs/toolchain@v1
93-
with:
94-
toolchain: stable
95-
override: true
96-
- name: Create dependency
97-
run: |
98-
cargo new dep_test
99-
cp contrib/depCargo.toml dep_test/Cargo.toml
100-
cd dep_test
101-
- name: Build dependency
102-
uses: actions-rs/cargo@v1
103-
with:
104-
command: check
105-
args: --verbose
106-
- name: Clean up
107-
run: |
108-
cd ..
109-
rm -rf dep_test
110-
android:
111-
runs-on: ubuntu-latest
112-
env:
113-
NDK_VERSION: 20.1.5948944
114-
ANDROID_CLI_ZIP: commandlinetools-linux-6858069_latest.zip
115-
ANDROID_CLI_SHA256: 87f6dcf41d4e642e37ba03cb2e387a542aa0bd73cb689a9e7152aad40a6e7a08
116-
steps:
117-
- uses: actions/checkout@v2
118-
- name: Install rust
119-
uses: actions-rs/toolchain@v1
120-
with:
121-
toolchain: stable
122-
override: true
123-
- name: set environment variables
124-
run: |
125-
ANDROID_SDK_ROOT="$GITHUB_WORKSPACE/sdk"
126-
NDK_HOME="$ANDROID_SDK_ROOT/ndk/$NDK_VERSION"
127-
echo "ANDROID_SDK_ROOT=$ANDROID_SDK_ROOT" >> $GITHUB_ENV
128-
echo "NDK_HOME=$NDK_HOME" >> $GITHUB_ENV
129-
echo "PATH=$PATH:$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin" >> $GITHUB_ENV
130-
- name: Install NDK
131-
run: |
132-
wget -nv https://dl.google.com/android/repository/$ANDROID_CLI_ZIP
133-
echo "$ANDROID_CLI_SHA256 $ANDROID_CLI_ZIP" > SHA256SUMS
134-
sha256sum -c SHA256SUMS
135-
unzip $ANDROID_CLI_ZIP
136-
mkdir -p $ANDROID_SDK_ROOT/cmdline-tools && mv cmdline-tools $ANDROID_SDK_ROOT/cmdline-tools/3.0
137-
yes 2>/dev/null | $ANDROID_SDK_ROOT/cmdline-tools/3.0/bin/sdkmanager --sdk_root=$ANDROID_SDK_ROOT \
138-
"build-tools;29.0.3" "platforms;android-29" "ndk;$NDK_VERSION" |grep -v '\[='; true
139-
- name: Add rust targets
140-
run: |
141-
rustup target add aarch64-linux-android x86_64-linux-android armv7-linux-androideabi i686-linux-android
142-
- name: Build for aarch64-linux-android
143-
run: |
144-
export CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android26-clang"
145-
export CC="aarch64-linux-android21-clang"
146-
export CFLAGS="--sysroot=$NDK_HOME/sysroot -I$NDK_HOME/sysroot/usr/include -I$NDK_HOME/sysroot/usr/include/aarch64-linux-android"
147-
export CXX="aarch64-linux-android21-clang++"
148-
export CXXFLAGS="$CFLAGS -nostdlib++ -I$NDK_HOME/sources/cxx-stl/llvm-libc++/include"
149-
export LDFLAGS="--sysroot=$NDK_HOME/platforms/android-21/arch-arm64"
150-
cargo check --all-features --target=aarch64-linux-android
151-
- name: Build for x86_64-linux-android
152-
run: |
153-
export CARGO_TARGET_X86_64_LINUX_ANDROID_LINKER="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/x86_64-linux-android26-clang"
154-
export CC="x86_64-linux-android21-clang"
155-
export CFLAGS="--sysroot=$NDK_HOME/sysroot -I$NDK_HOME/sysroot/usr/include -I$NDK_HOME/sysroot/usr/include/x86_64-linux-android"
156-
export CXX="x86_64-linux-android21-clang++"
157-
export CXXFLAGS="$CFLAGS -nostdlib++ -I$NDK_HOME/sources/cxx-stl/llvm-libc++/include"
158-
export LDFLAGS="--sysroot=$NDK_HOME/platforms/android-21/arch-x86_64"
159-
cargo check --all-features --target=x86_64-linux-android
160-
- name: Build for armv7-linux-androideabi
161-
run: |
162-
export CARGO_TARGET_ARMV7_LINUX_ANDROIDEABI_LINKER="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/armv7a-linux-androideabi26-clang"
163-
export CC="armv7a-linux-androideabi21-clang"
164-
export CFLAGS="--sysroot=$NDK_HOME/sysroot -I$NDK_HOME/sysroot/usr/include -I$NDK_HOME/sysroot/usr/include/arm-linux-androideabi"
165-
export CXX="armv7a-linux-androideabi21-clang++"
166-
export CXXFLAGS="$CFLAGS -nostdlib++ -I$NDK_HOME/sources/cxx-stl/llvm-libc++/include"
167-
export LDFLAGS="--sysroot=$NDK_HOME/platforms/android-21/arch-arm -L$NDK_HOME/sources/cxx-stl/llvm-libc++/libs/armeabi-v7a"
168-
cargo check --all-features --target=armv7-linux-androideabi
169-
- name: Build for i686-linux-android
170-
run: |
171-
export CARGO_TARGET_I686_LINUX_ANDROID_LINKER="$NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/i686-linux-android26-clang"
172-
export CC="i686-linux-android21-clang"
173-
export CFLAGS="--sysroot=$NDK_HOME/sysroot -I$NDK_HOME/sysroot/usr/include -I$NDK_HOME/sysroot/usr/include/i686-linux-android"
174-
export CXX="i686-linux-android21-clang++"
175-
export CXXFLAGS="$CFLAGS -nostdlib++ -I$NDK_HOME/sources/cxx-stl/llvm-libc++/include"
176-
export LDFLAGS="--sysroot=$NDK_HOME/platforms/android-21/arch-x86"
177-
cargo check --all-features --target=i686-linux-android
178-
ios:
179-
runs-on: macos-latest
180-
steps:
181-
- uses: actions/checkout@v2
182-
- name: Install rust
183-
uses: actions-rs/toolchain@v1
184-
with:
185-
toolchain: stable
186-
override: true
187-
- name: Dependencies and targets
188-
run: |
189-
rustup target add aarch64-apple-ios x86_64-apple-ios
190-
cargo install cargo-lipo
191-
- name: build
192-
uses: actions-rs/cargo@v1
62+
- uses: actions/checkout@v4
63+
- uses: dtolnay/rust-toolchain@master
19364
with:
194-
command: lipo
195-
args: --all-features --verbose
65+
toolchain: ${{matrix.toolchain}}
66+
- name: Toolchain ${{matrix.toolchain}}
67+
run: cargo +${{matrix.toolchain}} check --workspace --all-targets --all-features

.github/workflows/codecov.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,15 @@ name: Codecov
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches:
6+
- master
7+
tags:
8+
- 'v[0-9]+.*'
69
pull_request:
7-
branches: [ master ]
10+
branches:
11+
- master
12+
- develop
13+
- 'v[0-9]+.?*'
814

915
env:
1016
CARGO_TERM_COLOR: always
@@ -13,26 +19,22 @@ jobs:
1319
codecov:
1420
runs-on: ubuntu-latest
1521
steps:
16-
- uses: actions/checkout@v2
17-
- name: Install latest nightly
18-
uses: actions-rs/toolchain@v1
22+
- uses: actions/checkout@v4
23+
- uses: dtolnay/rust-toolchain@nightly
1924
with:
20-
toolchain: nightly
21-
override: true
22-
- name: Build & test
23-
uses: actions-rs/cargo@v1
25+
components: llvm-tools-preview
26+
- uses: taiki-e/install-action@cargo-llvm-cov
27+
- uses: taiki-e/install-action@nextest
28+
- name: Collect coverage data (including doctests)
29+
run: |
30+
cargo +nightly llvm-cov --no-report nextest --workspace --all-features
31+
cargo +nightly llvm-cov --no-report --doc --workspace --all-features
32+
cargo +nightly llvm-cov report --doctests --lcov --output-path lcov.info
33+
- name: Upload coverage data to codecov
34+
uses: codecov/codecov-action@v4
2435
with:
25-
command: test
26-
args: --workspace --all-features --no-fail-fast
27-
env:
28-
CARGO_INCREMENTAL: '0'
29-
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
30-
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off'
31-
- id: coverage
32-
name: Generate coverage
33-
uses: actions-rs/[email protected]
34-
- name: Upload coverage to Codecov
35-
uses: codecov/codecov-action@v1
36-
with:
37-
file: ${{ steps.coverage.outputs.report }}
38-
directory: ./coverage/reports/
36+
flags: rust
37+
files: lcov.info
38+
fail_ci_if_error: true
39+
token: ${{ secrets.CODECOV_TOKEN }}
40+
verbose: true

.github/workflows/lint.yml

Lines changed: 21 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
name: Lints
22

33
on:
4-
push:
5-
branches: [ master ]
64
pull_request:
7-
branches: [ master ]
5+
branches:
6+
- master
7+
- develop
8+
- 'v[0-9]+.?*'
89

910
env:
1011
CARGO_TERM_COLOR: always
@@ -13,45 +14,32 @@ jobs:
1314
fmt:
1415
runs-on: ubuntu-latest
1516
steps:
16-
- uses: actions/checkout@v2
17-
- name: Install rustc nightly
18-
uses: actions-rs/toolchain@v1
17+
- uses: actions/checkout@v4
18+
- uses: dtolnay/rust-toolchain@nightly
1919
with:
20-
toolchain: nightly
21-
override: true
2220
components: rustfmt
23-
- uses: actions-rs/cargo@v1
24-
name: Formatting
25-
with:
26-
command: fmt
27-
args: --all -- --check
21+
- name: Formatting
22+
run: cargo +nightly fmt --all -- --check
2823
clippy:
2924
runs-on: ubuntu-latest
3025
steps:
31-
- uses: actions/checkout@v2
32-
- name: Install rustc stable
33-
uses: actions-rs/toolchain@v1
26+
- uses: actions/checkout@v4
27+
- uses: dtolnay/rust-toolchain@stable
3428
with:
35-
toolchain: stable
36-
override: true
3729
components: clippy
38-
- uses: actions-rs/cargo@v1
39-
name: Clippy
40-
with:
41-
command: clippy
42-
args: --workspace --all-features
30+
- name: Formatting
31+
run: cargo clippy --workspace --all-features --all-targets -- -D warnings
4332
doc:
4433
runs-on: ubuntu-latest
4534
steps:
46-
- uses: actions/checkout@v2
47-
- name: Install rustc nightly
48-
uses: actions-rs/toolchain@v1
35+
- uses: actions/checkout@v4
36+
- uses: dtolnay/rust-toolchain@nightly
4937
with:
50-
toolchain: nightly
51-
override: true
5238
components: rust-docs
53-
- uses: actions-rs/cargo@v1
54-
name: Docs
55-
with:
56-
command: doc
57-
args: --workspace --all-features
39+
- name: Formatting
40+
run: cargo +nightly doc --workspace --all-features
41+
typos:
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@v4
45+
- uses: crate-ci/typos@master

0 commit comments

Comments
 (0)