mirror of
https://github.com/barry-ran/QtScrcpy.git
synced 2025-04-20 03:25:02 +00:00
82 lines
2.7 KiB
YAML
82 lines
2.7 KiB
YAML
name: Ubuntu
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'QtScrcpy/**'
|
|
- '!QtScrcpy/res/**'
|
|
- '.github/workflows/ubuntu.yml'
|
|
- 'ci/linux/**'
|
|
pull_request:
|
|
paths:
|
|
- 'QtScrcpy/**'
|
|
- '!QtScrcpy/res/**'
|
|
- '.github/workflows/ubuntu.yml'
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-22.04]
|
|
qt-ver: [6.5.3]
|
|
qt-arch-install: [gcc_64]
|
|
gcc-arch: [x64]
|
|
env:
|
|
target-name: QtScrcpy
|
|
qt-install-path: ${{ github.workspace }}/${{ matrix.qt-ver }}
|
|
plantform-des: ubuntu
|
|
steps:
|
|
- name: Install Qt
|
|
uses: jurplel/install-qt-action@v4.1.1
|
|
with:
|
|
version: ${{ matrix.qt-ver }}
|
|
modules: qtmultimedia
|
|
cached: ${{ steps.cache-qt.outputs.cache-hit }}
|
|
- name: Cache Qt
|
|
id: cache-qt
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ${{ env.qt-install-path }}/${{ matrix.qt-arch-install }}
|
|
key: ${{ runner.os }}/${{ matrix.qt-ver }}/${{ matrix.qt-arch-install }}
|
|
- name: Install GL library
|
|
run: sudo apt-get install -y libglew-dev libglfw3-dev libopengl-dev libx11-dev libxtst-dev
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'true'
|
|
ssh-key: ${{ secrets.BOT_SSH_KEY }}
|
|
- name: Build RelWithDebInfo
|
|
env:
|
|
ENV_QT_PATH: ${{ env.qt-install-path }}
|
|
run: |
|
|
ci/linux/build_for_linux.sh "RelWithDebInfo"
|
|
- name: Upload RelWithDebInfo
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: QtScrcpy-${{ matrix.os }}-${{ matrix.qt-arch-install }}-RelWithDebInfo
|
|
path: output/x64/RelWithDebInfo/*
|
|
- name: Build Release
|
|
env:
|
|
ENV_QT_PATH: ${{ env.qt-install-path }}
|
|
run: |
|
|
ci/linux/build_for_linux.sh "Release"
|
|
- name: Upload Release
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: QtScrcpy-${{ matrix.os }}-${{ matrix.qt-arch-install }}-Release
|
|
path: output/x64/Release/*
|
|
- name: Install the zip utility
|
|
run: |
|
|
sudo apt install zip -y
|
|
- name: Zip the Artifacts
|
|
run: |
|
|
zip -r QtScrcpy-${{ matrix.os }}-${{ matrix.qt-arch-install }}.zip output/x64/Release
|
|
- name: Upload to Releases
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: svenstaro/upload-release-action@2.3.0
|
|
with:
|
|
file: QtScrcpy-${{ matrix.os }}-${{ matrix.qt-arch-install }}.zip
|
|
asset_name: QtScrcpy-${{ matrix.os }}-${{ matrix.qt-arch-install }}.zip
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag: ${{ github.ref }}
|
|
overwrite: true
|