Skip to content

Update OCAT V_20240002 #1782

Update OCAT V_20240002

Update OCAT V_20240002 #1782

Workflow file for this run

name: Linux
# Qt官方没有linux平台的x86包
on:
push:
paths:
- '*.pro'
- '**'
- '.github/workflows/ubuntu.yml'
pull_request:
paths:
- '*.pro'
- '**'
- '.github/workflows/ubuntu.yml'
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
#os: [ubuntu-18.04,ubuntu-20.04]
# qt_ver: [5.9.9,5.12.10,5.15.2]
os: [ubuntu-20.04]
qt_ver: [5.15.2]
qt_arch: [gcc_64]
env:
targetName: OCAuxiliaryTools
VERSION: Linux
orgName: OCAT
steps:
- name: Install Qt
uses: jurplel/install-qt-action@v2.13.0
with:
version: ${{ matrix.qt_ver }}
cached: 'false'
- name: ubuntu install GL library
run: |
sudo apt-get install -y libglew-dev libglfw3-dev libxcb*
#sudo add-apt-repository universe
#sudo apt install libfuse2
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: build ubuntu
run: |
qmake
make
- name: install linuxdeployqt
run: |
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
# 打包
- name: package
run: |
cp icon.png bin/release/icon.png
cp default.desktop bin/release/default.desktop
cp -r Database bin/release/Database
chmod +x bin/release/Database/linux/macserial
chmod +x bin/release/Database/linux/ocvalidate
chmod +x bin/release/Database/linux/ocpasswordgen
#cp -r devDatabase bin/release/devDatabase
#chmod +x bin/release/devDatabase/linux/macserial
#chmod +x bin/release/devDatabase/linux/ocvalidate
#chmod +x bin/release/devDatabase/linux/ocpasswordgen
export VERSION # linuxdeployqt uses this for naming the file
./linuxdeployqt-continuous-x86_64.AppImage bin/release/${targetName} -unsupported-allow-new-glibc -appimage
#chmod +x ${{ env.targetName }}-${{ env.VERSION }}-x86_64.AppImage
# 上传artifacts
- uses: actions/upload-artifact@v2
with:
name: ${{ env.orgName }}-${{ env.VERSION }}-x86_64.AppImage
path: ${{ env.targetName }}-${{ env.VERSION }}-x86_64.AppImage
#name: ${{ env.orgName }}-${{ matrix.os }}-${{ matrix.qt_ver }}-${{ env.VERSION }}-x86_64.AppImage
#path: ${{ env.targetName }}-${{ env.VERSION }}-x86_64.AppImage
# tag 上传Release
- name: uploadRelease
if: startsWith(github.event.ref, 'refs/tags/')
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.targetName }}-${{ env.VERSION }}-x86_64.AppImage
asset_name: ${{ env.orgName }}-${{ env.VERSION }}-x86_64.AppImage
#file: ${{ env.targetName }}-${{ env.VERSION }}-x86_64.AppImage
#asset_name: ${{ env.orgName }}-${{ matrix.os }}-${{ matrix.qt_ver }}-${{ env.VERSION }}-x86_64.AppImage
tag: ${{ github.ref }}
overwrite: true