增加条件编译

This commit is contained in:
lubeilin
2023-07-29 18:19:53 +08:00
parent 7c30f2691a
commit dff51caf35
+15 -1
View File
@@ -40,36 +40,50 @@ jobs:
include: include:
- TARGET: i686-unknown-linux-musl # test in an alpine container on a mac - TARGET: i686-unknown-linux-musl # test in an alpine container on a mac
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: normal
- TARGET: x86_64-unknown-linux-gnu # tested in a debian container on a mac - TARGET: x86_64-unknown-linux-gnu # tested in a debian container on a mac
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: ring-cipher
- TARGET: x86_64-unknown-linux-musl # test in an alpine container on a mac - TARGET: x86_64-unknown-linux-musl # test in an alpine container on a mac
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: ring-cipher
- TARGET: aarch64-unknown-linux-gnu # tested on aws t4g.nano - TARGET: aarch64-unknown-linux-gnu # tested on aws t4g.nano
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: ring-cipher
- TARGET: aarch64-unknown-linux-musl # tested on aws t4g.nano in alpine container - TARGET: aarch64-unknown-linux-musl # tested on aws t4g.nano in alpine container
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: normal
- TARGET: armv7-unknown-linux-gnueabihf # raspberry pi 2-3-4, not tested - TARGET: armv7-unknown-linux-gnueabihf # raspberry pi 2-3-4, not tested
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: ring-cipher
- TARGET: armv7-unknown-linux-musleabihf # raspberry pi 2-3-4, not tested - TARGET: armv7-unknown-linux-musleabihf # raspberry pi 2-3-4, not tested
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: normal
- TARGET: arm-unknown-linux-gnueabihf # raspberry pi 0-1, not tested - TARGET: arm-unknown-linux-gnueabihf # raspberry pi 0-1, not tested
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: ring-cipher
- TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested - TARGET: arm-unknown-linux-musleabihf # raspberry pi 0-1, not tested
OS: ubuntu-latest OS: ubuntu-latest
FEATURES: normal
- TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings - TARGET: x86_64-apple-darwin # tested on a mac, is not properly signed so there are security warnings
OS: macos-latest OS: macos-latest
FEATURES: ring-cipher
- TARGET: aarch64-apple-darwin # tested on a mac, is not properly signed so there are security warnings - TARGET: aarch64-apple-darwin # tested on a mac, is not properly signed so there are security warnings
OS: macos-latest OS: macos-latest
FEATURES: ring-cipher
- TARGET: i686-pc-windows-msvc # tested on a windows machine - TARGET: i686-pc-windows-msvc # tested on a windows machine
OS: windows-latest OS: windows-latest
FEATURES: ring-cipher
- TARGET: x86_64-pc-windows-msvc # tested on a windows machine - TARGET: x86_64-pc-windows-msvc # tested on a windows machine
OS: windows-latest OS: windows-latest
FEATURES: ring-cipher
# needs: test # needs: test
runs-on: ${{ matrix.OS }} runs-on: ${{ matrix.OS }}
env: env:
NAME: vnt-cli # change with the name of your project NAME: vnt-cli # change with the name of your project
TARGET: ${{ matrix.TARGET }} TARGET: ${{ matrix.TARGET }}
OS: ${{ matrix.OS }} OS: ${{ matrix.OS }}
FEATURES: ${{ matrix.FEATURES }}
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Init submodules - name: Init submodules
@@ -108,7 +122,7 @@ jobs:
- name: Install rust target - name: Install rust target
run: rustup target add $TARGET run: rustup target add $TARGET
- name: Run build - name: Run build
run: cargo build --package vnt-cli --release --verbose --target $TARGET run: cargo build --package vnt-cli --release --verbose --target $TARGET --features $FEATURES
- name: List target - name: List target
run: find ./target run: find ./target
- name: Compress - name: Compress