Skip to content

tencentyun/iot-p2p@a7ff37d6 #516

tencentyun/iot-p2p@a7ff37d6

tencentyun/iot-p2p@a7ff37d6 #516

Workflow file for this run

name: Linux XP2P CI
on:
push:
paths-ignore: # 有時候不想要改個文档也触发 github actions
- '**.md'
- 'LICENSE'
jobs:
build-and-deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup cmake
uses: jwlawson/[email protected]
with:
cmake-version: '3.17.0'
- name: Use cmake
run: echo +++++$(cmake --version)
- name: build libenet
if: startsWith(github.event.ref, 'refs/heads')
run: |
ldd --version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
export GIT_BRANCH_IMAGE_VERSION=$VERSION
sh .github/script/build_enet_linux.sh Debug
env:
GIT_ACCESS_TOKEN: ${{ secrets.IOT_GITHUB_ACCESS_TOKEN }}
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
- name: push libenet
if: startsWith(github.event.ref, 'refs/tags')
run: |
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
export GIT_BRANCH_IMAGE_VERSION=$VERSION
sh .github/script/build_enet_linux.sh Release
env:
GIT_ACCESS_TOKEN: ${{ secrets.IOT_GITHUB_ACCESS_TOKEN }}
PROVISIONING_PASSWORD: ${{ secrets.GPG_DECRYPT_PASSPHRASE }}
- name: Compress SDK Artifacts
run: |
zip -r xp2p_linux.zip iot-p2p/iot/link/pc_app/p2p_sample
- name: Upload LinuxSDK Library
if: startsWith(github.event.ref, 'refs/heads')
uses: actions/upload-artifact@v4
with:
name: xp2p_linux_lib.zip
path: xp2p_linux.zip
# - name: Create Release
# id: create_release
# if: startsWith(github.event.ref, 'refs/tags')
# uses: actions/create-release@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
# with:
# tag_name: ${{ github.ref }}
# release_name: Release ${{ github.ref }}
# body: |
# this is a auto beta release
# - First Change
# - Second Change
# draft: false
# prerelease: true
- name: Upload binaries to release
if: startsWith(github.event.ref, 'refs/tags')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: xp2p_linux.zip
asset_name: xp2p_linux.zip
tag: ${{ github.ref }}
overwrite: true