chore: add ubuntu build script

This commit is contained in:
rankun 2020-02-28 11:04:52 +08:00 committed by Barry
parent 31a7d23dce
commit b2cb07c9e0
3 changed files with 51 additions and 0 deletions

51
.github/workflows/ubuntu.yml vendored Normal file
View file

@ -0,0 +1,51 @@
name: Ubuntu
# Qt官方没有linux平台的x86包
on:
push:
paths:
- 'QtScrcpy/**'
- '!QtScrcpy/res/**'
- '.github/workflows/**'
pull_request:
paths:
- 'QtScrcpy/**'
- '!QtScrcpy/res/**'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-16.04,ubuntu-18.04]
qt_ver: [5.12.6]
qt_arch: [gcc_64]
steps:
- name: Cache Qt
id: UbuntuCacheQt
uses: actions/cache@v1
with:
path: ../Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
key: ${{ runner.os }}-Qt/${{matrix.qt_ver}}/${{matrix.qt_arch}}
- 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
if: steps.UbuntuCacheQt.outputs.cache-hit != 'true'
uses: jurplel/install-qt-action@v2.0.0
with:
version: ${{ matrix.qt_ver }}
- name: Ubuntu install GL library
run: sudo apt-get install -y libglew-dev libglfw3-dev
- uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Build Ubuntu
run: |
export ENV_QT_GCC=$(pwd)/${{env.Qt5_Dir}}
ci/linux/build_for_ubuntu.sh release

View file

View file