Skip to content

Commit ff90633

Browse files
committed
Switch to Gitlab Actions
1 parent ea6d509 commit ff90633

File tree

6 files changed

+147
-130
lines changed

6 files changed

+147
-130
lines changed

.github/workflows/build.yml

+143
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
name: QMake Build Matrix
2+
3+
on: [push]
4+
5+
env:
6+
QT_VERSION: 6.8.0
7+
8+
jobs:
9+
build:
10+
name: ${{ matrix.config.name }}
11+
runs-on: ${{ matrix.config.os }}
12+
strategy:
13+
matrix:
14+
config:
15+
- name: "Linux Latest x64"
16+
artifact: "Linux-x64.zip"
17+
arch: ""
18+
os: ubuntu-latest
19+
# - name: "macOS Latest x64"
20+
# artifact: "macOS-x64.zip"
21+
# arch: ""
22+
# os: macos-latest
23+
# - name: "Windows Latest x64"
24+
# artifact: "Windows-x64.zip"
25+
# arch: win64_msvc2022_64
26+
# os: windows-latest
27+
# environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
28+
29+
steps:
30+
- uses: actions/checkout@v1
31+
32+
- name: Installing system libs on Linux
33+
if: runner.os == 'Linux'
34+
shell: cmake -P {0}
35+
run: |
36+
if ("${{ runner.os }}" STREQUAL "Linux")
37+
execute_process(
38+
COMMAND sudo apt install libusb-1.0-0-dev libhidapi-dev
39+
)
40+
endif()
41+
42+
- name: Installing system libs on Windows
43+
if: runner.os == 'Windows'
44+
run: ""
45+
46+
- name: Installing system libs on MacOS
47+
if: runner.os == 'macOS'
48+
run: ""
49+
50+
- name: Download Qt
51+
id: qt
52+
uses: jurplel/install-qt-action@v4
53+
with:
54+
version: "${{ env.QT_VERSION }}"
55+
arch: "${{ matrix.config.arch }}"
56+
57+
- name: Configure
58+
run: |
59+
cmake -S . -B build
60+
61+
- name: Build
62+
run: |
63+
cd build
64+
make -j $(nproc)
65+
66+
- uses: actions/upload-artifact@v4
67+
id: upload_artifact
68+
with:
69+
path: ./qtusb-${{ matrix.config.artifact }}
70+
name: qtusb-${{ matrix.config.artifact }}
71+
72+
release:
73+
if: contains(github.ref, 'tags/v')
74+
runs-on: ubuntu-latest
75+
needs: build
76+
77+
steps:
78+
- name: Create Release
79+
id: create_release
80+
uses: actions/[email protected]
81+
env:
82+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
83+
with:
84+
tag_name: ${{ github.ref }}
85+
release_name: Release ${{ github.ref }}
86+
draft: false
87+
prerelease: false
88+
89+
- name: Store Release url
90+
run: |
91+
echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url
92+
93+
- uses: actions/upload-artifact@v1
94+
with:
95+
path: ./upload_url
96+
name: upload_url
97+
98+
publish:
99+
if: contains(github.ref, 'tags/v')
100+
101+
name: "Publish ${{ matrix.config.name }}"
102+
runs-on: ${{ matrix.config.os }}
103+
strategy:
104+
matrix:
105+
config:
106+
- name: "Linux Latest x64"
107+
artifact: "Linux-x64.zip"
108+
os: ubuntu-latest
109+
# - name: "macOS Latest x64"
110+
# artifact: "macOS-x64.zip"
111+
# os: macos-latest
112+
# - name: "Windows Latest x64"
113+
# artifact: "Windows-x64.zip"
114+
# os: windows-latest
115+
needs: release
116+
117+
steps:
118+
- name: Download artifact
119+
uses: actions/download-artifact@v1
120+
with:
121+
name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }}
122+
path: ./
123+
124+
- name: Download URL
125+
uses: actions/download-artifact@v1
126+
with:
127+
name: upload_url
128+
path: ./
129+
- id: set_upload_url
130+
run: |
131+
upload_url=`cat ./upload_url`
132+
echo ::set-output name=upload_url::$upload_url
133+
134+
- name: Upload to Release
135+
id: upload_to_release
136+
uses: actions/[email protected]
137+
env:
138+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
139+
with:
140+
upload_url: ${{ steps.set_upload_url.outputs.upload_url }}
141+
asset_path: ./qtusb-${{ matrix.config.artifact }}
142+
asset_name: qtusb}-${{ matrix.config.artifact }}
143+
asset_content_type: application/zip

.travis.yml

-12
This file was deleted.

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.16)
44

55
include(.cmake.conf)
66
project(QtUsb
7-
VERSION 6.4.0 # FIXME: this needs to match host's Qt version
7+
VERSION 6.8.0 # FIXME: this needs to match host's Qt version
88
DESCRIPTION "A cross-platform USB Module for Qt."
99
HOMEPAGE_URL "https://github.com/fpoussin/QtUsb"
1010
LANGUAGES CXX C

Jenkinsfile

-38
This file was deleted.

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
# QtUsb [![GitHub version](https://badge.fury.io/gh/fpoussin%2Fqtusb.svg)](https://badge.fury.io/gh/fpoussin%2Fqtusb) [![Total alerts](https://img.shields.io/lgtm/alerts/g/fpoussin/QtUsb.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fpoussin/QtUsb/alerts/) [![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/fpoussin/QtUsb.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/fpoussin/QtUsb/context:cpp)
1+
# QtUsb [![GitHub version](https://badge.fury.io/gh/fpoussin%2Fqtusb.svg)](https://badge.fury.io/gh/fpoussin%2Fqtusb)
22

3-
4-
GCC: [![Build Status](https://jenkins.netyxia.net/buildStatus/icon?job=QtUsb%2Fmaster)](https://jenkins.netyxia.net/blue/organizations/jenkins/QtUsb/branches/)
5-
MSVC: [![Build status](https://ci.appveyor.com/api/projects/status/4ns2jbdoveyj8n0y?svg=true)](https://ci.appveyor.com/project/fpoussin/qtusb)
3+
GCC: ![Build Status]((https://github.com/fpoussin/QtUsb/actions/workflows/build.yml/badge.svg))](https://github.com/fpoussin/QtUsb/actions/)
4+
MSVC: ![Build status](https://ci.appveyor.com/api/projects/status/4ns2jbdoveyj8n0y?svg=true)](https://ci.appveyor.com/project/fpoussin/qtusb)
65

76
A Cross-platform USB Module for Qt built around libusb-1.0 and libhidapi
87
Can be used as a library, or included directly into the project

appveyor.yml

-75
This file was deleted.

0 commit comments

Comments
 (0)