Skip to content

Commit

Permalink
Merge pull request #2 from dongbeiouba/master
Browse files Browse the repository at this point in the history
CI support release
  • Loading branch information
dongbeiouba authored Jan 6, 2023
2 parents dc29ee1 + 51e9474 commit e885bce
Show file tree
Hide file tree
Showing 2 changed files with 128 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 .
Expand Down
127 changes: 127 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit e885bce

Please sign in to comment.