Skip to content

try fix cmake build 3 #72

try fix cmake build 3

try fix cmake build 3 #72

Workflow file for this run

name: CMake
on: [push]
env:
BUILD_TYPE: Release
BUILD_PATH: $GITHUB_WORKSPACE/build
SRC_PATH: $BUILD_PATH/src
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
submodules: true
# test
- name: Get tag name
uses: little-core-labs/[email protected]
id: tagName
- name: echo tag
run: echo "tag is $GIT_TAG_NAME"
- name: Create Build Environment
run: cmake -E make_directory $BUILD_PATH
- name: Configure CMake
shell: bash
run: cmake -S $SRC_PATH -B $BUILD_PATH -DCMAKE_BUILD_TYPE=$BUILD_TYPE
- name: Build
working-directory: $SRC_PATH
shell: bash
run: cmake --build . --config $BUILD_TYPE
- name: Test
working-directory: $SRC_PATH
shell: bash
run: ctest -C $BUILD_TYPE
- name: Upload release artifacts
uses: actions/[email protected]
with:
name: release
path: src/build/int2ssl
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: src/build/int2ssl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: build source deb and upload to PPA
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
sudo apt-get install -qq -o=Dpkg::Use-Pty=0 devscripts debhelper gpg cmake expect >/dev/null 2>&1
echo "${{ secrets.GPG_PRIVATE_KEY }}" | gpg --import
export key_id=$(gpg --list-keys | grep -A1 pub | grep -v 'pub\|-' | awk '{print $1}')
export DEBFULLNAME=$(gpg --list-keys | grep uid | awk '{print $5}')
export DEBEMAIL=$(gpg --list-keys | grep uid | awk '{print $6}' | tr -d '<' | tr -d '>')
expect -c "spawn gpg --edit-key $key_id trust quit; send \"5\ry\r\"; expect eof"
debuild -S -sa
dput ppa:bgforge.net/ppa ../int2ssl*source.changes