chore: update ubuntu.yml

This commit is contained in:
rankun 2020-03-22 22:32:37 +08:00
parent 63b89636d8
commit 1a1de1d6b4
3 changed files with 22 additions and 24 deletions

View file

@ -64,14 +64,14 @@ jobs:
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
with: with:
name: ${{ env.artifact-name }}.zip name: ${{ env.artifact-name }}.zip
path: ci\build\${{ env.artifact-name }} path: ci/build/${{ env.artifact-name }}
# Upload to release # Upload to release
- name: Upload Release - name: Upload Release
if: startsWith(github.ref, 'refs/tags/') if: startsWith(github.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v1-release uses: svenstaro/upload-release-action@v1-release
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ci\build\${{ env.publish_name }}.dmg file: ci/build/${{ env.publish_name }}.dmg
asset_name: ${{ env.publish_name }}.dmg asset_name: ${{ env.publish_name }}.dmg
tag: ${{ github.ref }} tag: ${{ github.ref }}
overwrite: true overwrite: true

View file

@ -19,34 +19,31 @@ jobs:
matrix: matrix:
os: [ubuntu-16.04,ubuntu-18.04] os: [ubuntu-16.04,ubuntu-18.04]
qt_ver: [5.12.6] qt_ver: [5.12.6]
qt_arch: [gcc_64] qt-target: [desktop]
qt-arch-install: [gcc_64]
gcc-arch: [x64]
env:
target-name: QtScrcpy
qt-install-path: ${{ github.workspace }}/${{ matrix.qt-ver }}
plantform-des: ubuntu
steps: steps:
- name: Cache Qt - name: Cache Qt
id: UbuntuCacheQt id: cache-qt
uses: actions/cache@v1 uses: actions/cache@v1
with: with:
path: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}} path: ${{ env.qt-install-path }}/${{ matrix.qt-arch-install }}
key: ${{ runner.os }}-Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}} key: ${{ runner.os }}/${{ matrix.qt-ver }}/${{ matrix.qt-arch-install }}
- name: Setup Qt
if: steps.UbuntuCacheQt.outputs.cache-hit == 'true'
shell: pwsh
env:
QtPath: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
run: |
$qt_Path=${env:QtPath}
echo "::set-env name=Qt5_Dir::$qt_Path"
echo "::add-path::$qt_Path/bin"
- name: Install Qt - name: Install Qt
if: steps.UbuntuCacheQt.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v2.0.0 uses: jurplel/install-qt-action@v2.0.0
with: with:
version: ${{ matrix.qt_ver }} version: ${{ matrix.qt-ver }}
cached: ${{ steps.cache-qt.outputs.cache-hit }}
- name: Ubuntu install GL library - name: Ubuntu install GL library
run: sudo apt-get install -y libglew-dev libglfw3-dev run: sudo apt-get install -y libglew-dev libglfw3-dev
- uses: actions/checkout@v1 - uses: actions/checkout@v1
with: with:
fetch-depth: 1 fetch-depth: 1
- name: Build Ubuntu - name: Build Ubuntu
run: | env:
export ENV_QT_GCC=$(pwd)/${{env.Qt5_Dir}} ENV_QT_PATH: ${{ env.qt-install-path }}
ci/linux/build_for_ubuntu.sh release run: ci/linux/build_for_ubuntu.sh release

View file

@ -6,8 +6,9 @@ echo check ENV
echo --------------------------------------------------------------- echo ---------------------------------------------------------------
# 从环境变量获取必要参数 # 从环境变量获取必要参数
# 例如 /home/barry/Qt5.9.6/5.9.6/gcc_64 # 例如 /home/barry/Qt5.9.6/5.9.6
echo ENV_QT_GCC $ENV_QT_GCC echo ENV_QT_PATH $ENV_QT_PATH
qt_gcc_path=$ENV_QT_PATH/gcc_64
# 获取绝对路径,保证其他目录执行此脚本依然正确 # 获取绝对路径,保证其他目录执行此脚本依然正确
{ {
@ -39,7 +40,7 @@ fi
echo current build mode: $build_mode echo current build mode: $build_mode
# 环境变量设置 # 环境变量设置
export PATH=$ENV_QT_GCC/bin:$PATH export PATH=$qt_gcc_path/bin:$PATH
echo echo
echo echo