Merge pull request #14 from Chow411/dev #48
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Linux Release | |
on: | |
push: | |
branches: | |
- 'dev' | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- 'dev' | |
defaults: | |
run: | |
shell: bash | |
env: | |
SOURCE_DIR: ${{ github.workspace }} | |
QT_VERSION: 6.4.2 | |
ARTIFACT: openterfaceQT | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Setup Dependencies | |
run: | | |
echo "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware | |
deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware | |
deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware" | sudo tee -a /etc/apt/sources.list | |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E98404D386FA1D9 6ED0E7B82643E131 F8D2585B8783D481 54404762BBB6E853 BDE6D2B9216EC7A8 | |
sudo apt-get update -y | |
sudo apt-get install -y \ | |
build-essential \ | |
qmake6 \ | |
qt6-base-dev \ | |
qt6-multimedia-dev \ | |
qt6-serialport-dev \ | |
mesa-common-dev | |
- name: Get all tags for correct version determination | |
working-directory: ${{ github.workspace }} | |
run: | | |
git fetch --all --tags -f | |
- name: Create build directory | |
run: mkdir ${{ runner.temp }}/build | |
- name: Configure And Build | |
working-directory: ${{ runner.temp }}/build | |
run: | | |
qmake6 ${{ github.workspace }} && make -j$(nproc) | |
- name: Create deb package | |
working-directory: ${{ runner.temp }} | |
run: | | |
mkdir -p package/DEBIAN | |
# Create control file with package information | |
echo "Package: ${{ env.ARTIFACT }} | |
Version: 0.0.1 | |
Section: base | |
Priority: optional | |
Architecture: all | |
Maintainer: TechXArtisan <info@techxartisan.com> | |
Description: OpenterfaceQT" > package/DEBIAN/control | |
# Copy files to package directory | |
mkdir -p package/usr/bin | |
cp -r build/${{ env.ARTIFACT }} package/usr/bin | |
# Build deb package | |
mv package ${{ env.ARTIFACT }} | |
dpkg-deb --build ${{ env.ARTIFACT }} | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ${{ env.ARTIFACT }} | |
path: ${{ runner.temp }}/${{ env.ARTIFACT }}.deb |