|
|
@@ -20,59 +20,95 @@ jobs:
|
|
|
- os: ubuntu-latest
|
|
|
target: x86_64-unknown-linux-gnu
|
|
|
exe: rathole
|
|
|
- - os: ubuntu-latest
|
|
|
- target: x86_64-unknown-linux-musl
|
|
|
- exe: rathole
|
|
|
+ cross: false
|
|
|
- os: ubuntu-latest
|
|
|
target: aarch64-unknown-linux-musl
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: arm-unknown-linux-musleabi
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: arm-unknown-linux-musleabihf
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: armv7-unknown-linux-musleabihf
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: mips-unknown-linux-gnu
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: mips-unknown-linux-musl
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: mipsel-unknown-linux-gnu
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: mipsel-unknown-linux-musl
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: mips64-unknown-linux-gnuabi64
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
- os: ubuntu-latest
|
|
|
target: mips64el-unknown-linux-gnuabi64
|
|
|
exe: rathole
|
|
|
+ cross: true
|
|
|
|
|
|
- os: macos-latest
|
|
|
target: x86_64-apple-darwin
|
|
|
exe: rathole
|
|
|
+ cross: false
|
|
|
|
|
|
- os: windows-latest
|
|
|
target: x86_64-pc-windows-msvc
|
|
|
exe: rathole.exe
|
|
|
+ cross: false
|
|
|
steps:
|
|
|
- uses: actions/checkout@v2
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
with:
|
|
|
profile: minimal
|
|
|
- toolchain: stable
|
|
|
+ # Since rust 1.72, some platforms are tier 3
|
|
|
+ toolchain: 1.71
|
|
|
+ default: true
|
|
|
+
|
|
|
+ - name: Install OpenSSL
|
|
|
+ if: matrix.os == 'ubuntu-latest'
|
|
|
+ run: sudo apt-get install pkg-config libssl-dev
|
|
|
+ - name: Install OpenSSL
|
|
|
+ if: matrix.os == 'macos-latest'
|
|
|
+ run: brew install openssl@3
|
|
|
+
|
|
|
+ # Native build
|
|
|
+ - name: Install target
|
|
|
+ if: matrix.cross == false
|
|
|
+ run: rustup target add ${{ matrix.target }}
|
|
|
+ - name: Run tests
|
|
|
+ if: matrix.cross == false
|
|
|
+ run: cargo test --release --target ${{ matrix.target }} --verbose
|
|
|
+ - name: Build release
|
|
|
+ if: matrix.cross == false
|
|
|
+ run: cargo build --release --target ${{ matrix.target }}
|
|
|
+
|
|
|
+ # Cross build
|
|
|
- name: Install cross
|
|
|
- run: cargo install --version 0.1.16 cross
|
|
|
+ if: matrix.cross
|
|
|
+ run: cargo install --version 0.2.5 cross
|
|
|
- name: Run tests
|
|
|
- run: cross test --release --target ${{ matrix.target }} --verbose
|
|
|
+ if: matrix.cross
|
|
|
+ run: cross test --release --target ${{ matrix.target }} --verbose --features embedded --no-default-features
|
|
|
- name: Build release
|
|
|
- run: cross build --release --target ${{ matrix.target }}
|
|
|
+ if: matrix.cross
|
|
|
+ run: cross build --release --target ${{ matrix.target }} --features embedded --no-default-features
|
|
|
+
|
|
|
- name: Run UPX
|
|
|
# Upx may not support some platforms. Ignore the errors
|
|
|
continue-on-error: true
|