Skip to content

Commit

Permalink
Merge #367
Browse files Browse the repository at this point in the history
367: Use github actions for CI r=sopium a=sopium

bors merge

Co-authored-by: Yin Guanhao <sopium@mysterious.site>
  • Loading branch information
bors[bot] and blckngm authored Jul 31, 2021
2 parents 7bbe885 + 2da42ed commit 8bc939b
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 245 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
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
27 changes: 0 additions & 27 deletions .github/workflows/dependabot-update-fuzz-too.yml

This file was deleted.

48 changes: 48 additions & 0 deletions .github/workflows/release.yml
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
217 changes: 0 additions & 217 deletions azure-pipelines.yml

This file was deleted.

6 changes: 5 additions & 1 deletion bors.toml
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

0 comments on commit 8bc939b

Please sign in to comment.