Skip to content

Commit 119e033

Browse files
committed
Update actions
1 parent a426850 commit 119e033

File tree

3 files changed

+96
-3
lines changed

3 files changed

+96
-3
lines changed

.github/workflows/build-nightly.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
./build-release -t ${{ matrix.target }} $compile_features $compile_compress
3333
3434
- name: Upload Artifacts
35-
uses: actions/upload-artifact@v2
35+
uses: actions/upload-artifact@v4
3636
with:
3737
name: ${{ matrix.target }}
3838
path: build/release/*
@@ -72,7 +72,7 @@ jobs:
7272
./build/build-host-release -t ${{ matrix.target }}
7373
7474
- name: Upload Artifacts
75-
uses: actions/upload-artifact@v2
75+
uses: actions/upload-artifact@v4
7676
with:
7777
name: ${{ matrix.target }}
7878
path: build/release/*

.github/workflows/build-pr.yml

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Build PR
2+
on:
3+
pull_request:
4+
types: [ opened, edited, reopened, review_requested ]
5+
branches: [ master ]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
build-cross:
12+
runs-on: ubuntu-latest
13+
env:
14+
RUST_BACKTRACE: full
15+
strategy:
16+
matrix:
17+
target:
18+
- x86_64-unknown-linux-musl
19+
- aarch64-unknown-linux-musl
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
24+
- name: Install cross
25+
run: cargo install cross
26+
27+
- name: Build ${{ matrix.target }}
28+
timeout-minutes: 120
29+
run: |
30+
compile_target=${{ matrix.target }}
31+
32+
cd build
33+
./build-release -t ${{ matrix.target }} $compile_features $compile_compress
34+
35+
build-unix:
36+
runs-on: ${{ matrix.os }}
37+
env:
38+
RUST_BACKTRACE: full
39+
strategy:
40+
matrix:
41+
os: [macos-latest]
42+
target:
43+
- x86_64-apple-darwin
44+
- aarch64-apple-darwin
45+
steps:
46+
- uses: actions/checkout@v2
47+
48+
- name: Install GNU tar
49+
if: runner.os == 'macOS'
50+
run: |
51+
brew install gnu-tar
52+
# echo "::add-path::/usr/local/opt/gnu-tar/libexec/gnubin"
53+
echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH
54+
55+
- name: Install Rust stable
56+
uses: actions-rs/toolchain@v1
57+
with:
58+
profile: minimal
59+
toolchain: stable
60+
target: ${{ matrix.target }}
61+
default: true
62+
override: true
63+
64+
- name: Build release
65+
shell: bash
66+
run: |
67+
./build/build-host-release -t ${{ matrix.target }}
68+
69+
build-windows:
70+
runs-on: windows-latest
71+
env:
72+
RUSTFLAGS: "-Ctarget-feature=+crt-static"
73+
RUST_BACKTRACE: full
74+
steps:
75+
- uses: actions/checkout@v2
76+
77+
- name: Install Rust stable
78+
uses: actions-rs/toolchain@v1
79+
with:
80+
profile: minimal
81+
toolchain: stable
82+
default: true
83+
override: true
84+
85+
- name: Build release
86+
run: |
87+
pwsh ./build/build-host-release.ps1
88+
89+
- name: Upload Artifacts
90+
uses: actions/upload-artifact@v2
91+
with:
92+
name: windows-native
93+
path: build/release/*

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version = "0.3.0"
44
authors = ["Max Lv <max.c.lv@gmail.com>"]
55
repository = "https://github.com/shadowsocks/qtun"
66
license = "MIT"
7-
edition = "2024"
7+
edition = "2021"
88

99
[[bin]]
1010
name = "qtun-client"

0 commit comments

Comments
 (0)