Skip to content

fix cmake and ci for libusb branch #258

fix cmake and ci for libusb branch

fix cmake and ci for libusb branch #258

name: Build Linux
on:
push:
branches: [ master, feature/github-actions, test/libusb ]
pull_request:
branches: [ master, feature/github-actions ]
release:
types: [published]
jobs:
build:
name: "Build: ${{ matrix.os }} - static ${{ matrix.statictype }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
statictype: [ON, OFF]
steps:
- name: Checkout Git Repo
uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: workaround for default apt mirror connectivity issues
run: |
sudo sed -i 's/azure\.//' /etc/apt/sources.list
- name: Install dependencies
run: |
set -e
sudo add-apt-repository universe
sudo apt update
sudo apt install -y cmake ninja-build libarchive-dev libzstd-dev zlib1g-dev libgl1-mesa-dev nettle-dev libacl1-dev liblz4-dev libc6-dev libusb-1.0-0-dev
- name: Install Qt
uses: jurplel/install-qt-action@f03f05556819ceb3781ee2f455ec44c339d683c0 # v4
with:
version: 6.7.1
target: desktop
setup-python: false
cache: true
- name: Build static libpng-apng dependency
run: |
set -e
cd gui/qt/capture ; /bin/bash ./get_libpng-apng.sh ; cd ../../../
- name: Build CEmu Qt in Release
run: |
set -e
mkdir build && cd build
cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DTRY_STATIC_LIBS=${{ matrix.statictype }} ../gui/qt
cmake --build . --target all
- name: Upload binary as artifact
uses: actions/upload-artifact@v3
with:
name: CEmu_linux_static${{ matrix.statictype }}_master
path: ${{ github.workspace }}/build/CEmu
- name: Prepare binary for release upload
if: ${{ matrix.statictype == 'ON' }}
run: |
mv ${{ github.workspace }}/build/CEmu ${{ github.workspace }}/build/CEmu-nightly_linux64_qt6
- name: Update nightly release
if: ${{ matrix.statictype == 'ON' && github.ref == 'refs/heads/master' && github.event_name != 'pull_request' }}
uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b # latest as of 2023-01-13
with:
tag_name: nightly
prerelease: true
token: ${{secrets.GITHUB_TOKEN}}
files: |
${{ github.workspace }}/build/CEmu-nightly_linux64_qt6