-
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.
- Loading branch information
Showing
5 changed files
with
124 additions
and
245 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 |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- trying | ||
- staging | ||
|
||
jobs: | ||
test: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.54.0 | ||
profile: minimal | ||
components: rustfmt, clippy | ||
|
||
- uses: actions/setup-node@v2 | ||
if: matrix.os == 'windows-latest' | ||
with: | ||
node-version: '16' | ||
|
||
- name: Test | ||
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' | ||
env: | ||
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: sudo -E | ||
CARGO_TARGET_X86_64_APPLE_DARWIN_RUNNER: sudo -E | ||
RUSTFLAGS: -D warnings | ||
run: cargo test --all --all-targets --all-features --locked | ||
|
||
- name: Integration Test | ||
if: matrix.os == 'ubuntu-latest' | ||
run: | | ||
set -ex | ||
sudo apt-get update | ||
sudo apt-get install -yqq wireguard net-tools | ||
cargo build | ||
cd ns-test | ||
sudo ./integration-test.sh | ||
sudo ./interop-test.sh | ||
- name: Test | ||
if: matrix.os == 'windows-latest' | ||
shell: bash | ||
env: | ||
RUSTFLAGS: -D warnings | ||
TESTING: 1 | ||
run: | | ||
set -ex | ||
cd windows-gui-client && yarn && yarn build && cd .. | ||
cargo test --all --all-targets --locked | ||
- name: Check Fuzz | ||
if: matrix.os == 'ubuntu-latest' | ||
run: cd fuzz && cargo check --locked | ||
|
||
- name: Fmt check | ||
if: matrix.os == 'macos-latest' | ||
run: | | ||
set -ex | ||
cargo fmt --all -- --check | ||
cargo run --example check-copyright | ||
cd fuzz && cargo fmt -- --check | ||
- name: Clippy | ||
run: cargo clippy --all --all-targets -- -D clippy::all |
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 |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
|
||
jobs: | ||
release: | ||
strategy: | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: 1.54.0 | ||
profile: minimal | ||
components: rustfmt, clippy | ||
|
||
- uses: actions/setup-node@v2 | ||
if: matrix.os == 'windows-latest' | ||
with: | ||
node-version: '16' | ||
|
||
- if: matrix.os == 'windows-latest' | ||
uses: microsoft/setup-msbuild@v1.0.2 | ||
|
||
- name: Build (Windows) | ||
if: matrix.os == 'windows-latest' | ||
run: | | ||
cd windows-gui-client && yarn && yarn build && cd .. | ||
cargo build --release | ||
msbuild windows-gui-installer/titun-windows-gui-installer.sln /property:Configuration=Release /property:Platform=x64 | ||
cp windows-gui-installer/installer/bin/Release/titun.msi titun-$(uname -m).msi | ||
- name: Build (linux/macos) | ||
if: matrix.os == 'macos-latest' || matrix.os == 'ubuntu-latest' | ||
run: cargo build --release && xz --stdout target/release/titun > target/release/titun-$(uname -m)-${{ matrix.os == 'ubuntu-latest' && 'linux' || 'macos' }}.xz | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
draft: true | ||
files: | | ||
target/release/titun-* | ||
titun-*.msi |
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,2 +1,6 @@ | ||
status = ["sopium.titun"] | ||
status = [ | ||
"test (ubuntu-latest)", | ||
"test (windows-latest)", | ||
"test (macos-latest)", | ||
] | ||
delete_merged_branches = true |