From 5c626fa13315809d318eca5785f171fd54402d45 Mon Sep 17 00:00:00 2001 From: K1 Date: Thu, 5 Jan 2023 10:39:42 +0800 Subject: [PATCH 1/2] CI support release --- .github/workflows/release.yml | 127 ++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000000000..f2eb1c22681505 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,127 @@ +# Copyright (C) 2023 +# +# SPDX-License-Identifier: curl + +name: release + +on: + workflow_dispatch: + tags: + - '*' + +jobs: + new_release: + runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Create Release + id: create_release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body: | + Changes in this Release + - First Change + - Second Change + draft: true + prerelease: true + build_linux_macos: + runs-on: ${{ matrix.builder }} + needs: [new_release] + strategy: + matrix: + builder: [macos-latest, ubuntu-latest] + name: "build-${{ matrix.builder }}" + steps: + - run: brew install libtool autoconf automake pkg-config + if: ${{ matrix.builder == 'macos-latest' }} + - name: build Tongsuo + run: | + VERSION=8.3.2 + wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${VERSION}.tar.gz" + tar zxf "${VERSION}.tar.gz" + pushd "Tongsuo-${VERSION}" + ./config --prefix=${GITHUB_WORKSPACE}/tongsuo no-shared enable-ntls --release + make -s -j4 + make install_sw + popd + - uses: actions/checkout@v2 + with: + path: curl + fetch-depth: 0 + - name: build curl + working-directory: ./curl + run: | + autoreconf -fi + ./configure --enable-warnings --enable-werror --with-openssl=${GITHUB_WORKSPACE}/tongsuo --without-zlib --without-brotli --disable-shared --disable-ldap --disable-ldaps --disable-rtsp --without-librtmp --enable-static + make -s -j4 + + - name: upload artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ needs.new_release.outputs.upload_url }} + asset_path: ./curl/src/curl + asset_name: curl-${{ runner.os }} + asset_content_type: application/octet-stream + + build_windows: + runs-on: windows-latest + needs: [new_release] + steps: + - run: choco install -y winrar + - uses: ilammy/msvc-dev-cmd@v1 + with: + arch: win64 + - uses: ilammy/setup-nasm@v1 + with: + platform: win64 + - uses: shogo82148/actions-setup-perl@v1 + - name: Export env + shell: bash + run: | + VERSION=8.3.2 + echo "TONGSUO_VERSION=${VERSION}" >> $GITHUB_ENV + echo "TONGSUO_HOME=${GITHUB_WORKSPACE}\tongsuo${VERSION}" >> $GITHUB_ENV + - name: Download Tongsuo source + run: | + wget "https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/${env:TONGSUO_VERSION}.tar.gz" -OutFile "${env:TONGSUO_VERSION}.tar.gz" + shell: powershell + - run: '"C:\Program Files\WinRAR\WinRAR.exe" -INUL x %TONGSUO_VERSION%.tar.gz' + shell: cmd + - name: Build Tongsuo + shell: cmd + run: | + pushd "Tongsuo-%TONGSUO_VERSION%" + mkdir _build + pushd _build + perl ..\Configure no-makedepend no-shared VC-WIN64A --prefix=%TONGSUO_HOME% + nmake /S + nmake install_sw + popd + popd + - uses: actions/checkout@v2 + with: + path: curl + fetch-depth: 0 + - name: build curl + working-directory: ./curl + shell: powershell + run: | + ./buildconf.bat + cd winbuild + nmake /f Makefile.vc mode=static WITH_SSL=static SSL_PATH=${env:TONGSUO_HOME} RTLIBCFG=static + - name: upload artifact + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ needs.new_release.outputs.upload_url }} + asset_path: .\curl\builds\libcurl-vc-x64-release-static-ssl-static-ipv6-sspi\bin\curl.exe + asset_name: curl-${{ runner.os }}.exe + asset_content_type: application/octet-stream From 51e94746cc3f2ef21bb0119bb73698f05bb41817 Mon Sep 17 00:00:00 2001 From: K1 Date: Fri, 6 Jan 2023 14:27:32 +0800 Subject: [PATCH 2/2] Fix CI msh3 --- .github/workflows/linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4574548206682c..922c9e64e350bd 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -166,7 +166,7 @@ jobs: - if: ${{ contains(matrix.build.install_steps, 'msh3') }} run: | - git clone --depth=1 --recursive https://github.com/nibanks/msh3 + git clone -b v0.4.0 --depth=1 --recursive https://github.com/nibanks/msh3 cd msh3 && mkdir build && cd build cmake -G 'Unix Makefiles' -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=$HOME/msh3 .. cmake --build .