From d721c783d7739f84d2911607b95a86cee7c7e40f Mon Sep 17 00:00:00 2001 From: 808Mak1r <39427457+808Mak1r@users.noreply.github.com> Date: Sat, 22 Oct 2022 11:24:12 +0800 Subject: [PATCH] fix: Test build windows gnu --- .github/workflows/CICD.yml | 21 ++-- .github/workflows/build-release.yml | 170 ---------------------------- .github/workflows/gnu.yml | 54 --------- 3 files changed, 11 insertions(+), 234 deletions(-) delete mode 100644 .github/workflows/build-release.yml delete mode 100644 .github/workflows/gnu.yml diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 7f03c3d..efa2a03 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -132,17 +132,18 @@ jobs: fail-fast: false matrix: job: - # - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } - # - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true } - # - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true } - # - { target: i686-pc-windows-msvc , os: windows-2019 } - # - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } - # - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true } - # - { target: x86_64-apple-darwin , os: macos-10.15 } + - { target: aarch64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } + - { target: aarch64-apple-darwin , os: macos-latest, } + - { target: arm-unknown-linux-gnueabihf , os: ubuntu-20.04, use-cross: true } + - { target: arm-unknown-linux-musleabihf, os: ubuntu-20.04, use-cross: true } + - { target: i686-pc-windows-msvc , os: windows-2019 } + - { target: i686-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } + - { target: i686-unknown-linux-musl , os: ubuntu-20.04, use-cross: true } + - { target: x86_64-apple-darwin , os: macos-10.15 } - { target: x86_64-pc-windows-gnu , os: ubuntu-20.04, use-cross: true } - # - { target: x86_64-pc-windows-msvc , os: windows-2019 } - # - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } - # - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true } + - { target: x86_64-pc-windows-msvc , os: windows-2019 } + - { target: x86_64-unknown-linux-gnu , os: ubuntu-20.04, use-cross: true } + - { target: x86_64-unknown-linux-musl , os: ubuntu-20.04, use-cross: true } steps: - name: Checkout source code uses: actions/checkout@v3 diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml deleted file mode 100644 index bf390ce..0000000 --- a/.github/workflows/build-release.yml +++ /dev/null @@ -1,170 +0,0 @@ -name: Build Releases -on: - push: - branches: - - main - tags: - - v* - -env: - CARGO_TERM_COLOR: always - -jobs: - build-cross: - runs-on: ubuntu-latest - env: - RUST_BACKTRACE: full - strategy: - matrix: - target: - # - i686-unknown-linux-musl - - x86_64-pc-windows-gnu - # - x86_64-unknown-linux-gnu - # - x86_64-unknown-linux-musl - # - armv7-unknown-linux-musleabihf - # - armv7-unknown-linux-gnueabihf - # - arm-unknown-linux-gnueabi - # - arm-unknown-linux-gnueabihf - # - arm-unknown-linux-musleabi - # - arm-unknown-linux-musleabihf - # - aarch64-unknown-linux-gnu - # - aarch64-unknown-linux-musl - # - mips-unknown-linux-musl - # - mips-unknown-linux-gnu - # - mipsel-unknown-linux-musl - - steps: - - uses: actions/checkout@v2 - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true - - - name: Install cross - run: cargo install cross - - # - name: Build ${{ matrix.target }} - # timeout-minutes: 120 - # run: | - # compile_target=${{ matrix.target }} - - # if [[ "$compile_target" == *"-linux-"* || "$compile_target" == *"-apple-"* ]]; then - # compile_features="-f local-redir -f local-tun" - # fi - - # if [[ "$compile_target" == "mips-"* || "$compile_target" == "mipsel-"* || "$compile_target" == "mips64-"* || "$compile_target" == "mips64el-"* ]]; then - # sudo apt-get update -y && sudo apt-get install -y upx; - # if [[ "$?" == "0" ]]; then - # compile_compress="-u" - # fi - # fi - - # if [[ "$compile_target" == "aarch64-"* ]]; then - # compile_features="$compile_features -f armv8 -f neon" - # fi - - # cd build - # ./build-release -t ${{ matrix.target }} $compile_features $compile_compress - - name: Build - uses: actions-rs/cargo@v1 - with: - use-cross: true - command: build - args: --locked --release --target=${{ matrix.target }} - - # - name: Upload Github Assets - # uses: softprops/action-gh-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # files: build/release/* - # prerelease: ${{ contains(github.ref, '-') }} - - build-unix: - runs-on: ${{ matrix.os }} - env: - BUILD_EXTRA_FEATURES: "local-redir local-tun armv8 neon" - RUST_BACKTRACE: full - strategy: - matrix: - # os: [ubuntu-latest, macos-latest] - os: [macos-latest] - target: - # - x86_64-apple-darwin - - aarch64-apple-darwin - steps: - - uses: actions/checkout@v2 - - - name: Install GNU tar - if: runner.os == 'macOS' - run: | - brew install gnu-tar - # echo "::add-path::/usr/local/opt/gnu-tar/libexec/gnubin" - echo "/usr/local/opt/gnu-tar/libexec/gnubin" >> $GITHUB_PATH - - - name: Install Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - target: ${{ matrix.target }} - toolchain: stable - default: true - override: true - - # https://github.com/actions/virtual-environments/issues/2557#issuecomment-769611326 - - if: ${{ matrix.target }} == 'aarch64-apple-darwin' - run: | - sudo xcode-select -s /Applications/Xcode_12.4.app && - sudo rm -Rf /Library/Developer/CommandLineTools/SDKs/* - - - name: Build - uses: actions-rs/cargo@v1 - with: - # use-cross: ${{ matrix.job.use-cross }} - command: build - args: --locked --release --target=${{ matrix.target }} - # - name: Build release - # shell: bash - # run: | - # ./build/build-host-release -t ${{ matrix.target }} - - # - name: Upload Github Assets - # uses: softprops/action-gh-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # files: build/release/* - # prerelease: ${{ contains(github.ref, '-') }} - - # build-windows: - # runs-on: windows-latest - # env: - # RUSTFLAGS: "-C target-feature=+crt-static" - # RUST_BACKTRACE: full - # steps: - # - uses: actions/checkout@v2 - - # - name: Install Rust - # uses: actions-rs/toolchain@v1 - # with: - # profile: minimal - # toolchain: stable - # default: true - # override: true - - # - name: Build release - # run: | - # pwsh ./build/build-host-release.ps1 - - # - name: Upload Github Assets - # uses: softprops/action-gh-release@v1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # files: build/release/* - # prerelease: ${{ contains(github.ref, '-') }} \ No newline at end of file diff --git a/.github/workflows/gnu.yml b/.github/workflows/gnu.yml deleted file mode 100644 index cc07c61..0000000 --- a/.github/workflows/gnu.yml +++ /dev/null @@ -1,54 +0,0 @@ -name: GNU -on: - push: - branches: [main] - pull_request: - branches: [main] - -defaults: - run: - shell: bash - -jobs: - test: - name: Test - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - include: - - target: x86_64-pc-windows-gnu - rust: stable - os: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - with: - submodules: true - - name: Install Rust (rustup) - run: rustup update ${{ matrix.rust }} --no-self-update && rustup default ${{ matrix.rust }} - - run: rustup target add ${{ matrix.target }} - - # - name: Set crt-static - # if: matrix.crt_static == 'yes' - # run: echo RUSTFLAGS=-Ctarget-feature=+crt-static >> $GITHUB_ENV - - - name: Use strawberry perl - # if: startsWith(matrix.os, 'windows') - run: echo OPENSSL_SRC_PERL=C:/Strawberry/perl/bin/perl >> $GITHUB_ENV - - # - name: Download nasm.exe (Windows) - # if: matrix.nasm_exe == 'installed' - # run: | - # WINNASMVERSION='2.15.05' - # curl -O https://www.nasm.us/pub/nasm/releasebuilds/${WINNASMVERSION}/win64/nasm-${WINNASMVERSION}-win64.zip - # unzip nasm-${WINNASMVERSION}-win64.zip - # echo "$GITHUB_WORKSPACE\\nasm-${WINNASMVERSION}" >> $GITHUB_PATH - # echo "OPENSSL_RUST_USE_NASM=1" >> $GITHUB_ENV - - - name: Run tests (Windows) - # if: startsWith(matrix.os, 'windows') - run: | - cargo test --target ${{ matrix.target }} -vv - cargo test --target ${{ matrix.target }} --release -vv - cargo run --locked --release --target ${{ matrix.target }} \ No newline at end of file