Skip to content

Commit ff135e3

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

File tree

6 files changed

+151
-130
lines changed

6 files changed

+151
-130
lines changed

.github/workflows/build.yml

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