Skip to content

Commit 050f05c

Browse files
committed
Switch to Gitlab Actions
1 parent ea6d509 commit 050f05c

File tree

6 files changed

+150
-130
lines changed

6 files changed

+150
-130
lines changed

.github/workflows/build.yml

+146
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
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+
make
62+
63+
- uses: actions/upload-artifact@v4
64+
id: upload_artifact
65+
with:
66+
path: ./qtusb-${{ matrix.config.artifact }}
67+
name: qtusb-${{ matrix.config.artifact }}
68+
69+
release:
70+
if: contains(github.ref, 'tags/v')
71+
runs-on: ubuntu-latest
72+
needs: build
73+
74+
steps:
75+
- name: Create Release
76+
id: create_release
77+
uses: actions/[email protected]
78+
env:
79+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
with:
81+
tag_name: ${{ github.ref }}
82+
release_name: Release ${{ github.ref }}
83+
draft: false
84+
prerelease: false
85+
86+
- name: Store Release url
87+
run: |
88+
echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url
89+
90+
- uses: actions/upload-artifact@v1
91+
with:
92+
path: ./upload_url
93+
name: upload_url
94+
95+
publish:
96+
if: contains(github.ref, 'tags/v')
97+
98+
name: ${{ matrix.config.name }}
99+
runs-on: ${{ matrix.config.os }}
100+
strategy:
101+
matrix:
102+
config:
103+
# - {
104+
# name: "Windows Latest x64",
105+
# artifact: "Windows-x64.zip",
106+
# os: windows-latest
107+
# }
108+
- {
109+
name: "Linux Latest x64",
110+
artifact: "Linux-x64.zip",
111+
os: ubuntu-latest
112+
}
113+
# - {
114+
# name: "macOS Latest x64",
115+
# artifact: "macOS-x64.zip",
116+
# os: macos-latest
117+
# }
118+
needs: release
119+
120+
steps:
121+
- name: Download artifact
122+
uses: actions/download-artifact@v1
123+
with:
124+
name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }}
125+
path: ./
126+
127+
- name: Download URL
128+
uses: actions/download-artifact@v1
129+
with:
130+
name: upload_url
131+
path: ./
132+
- id: set_upload_url
133+
run: |
134+
upload_url=`cat ./upload_url`
135+
echo ::set-output name=upload_url::$upload_url
136+
137+
- name: Upload to Release
138+
id: upload_to_release
139+
uses: actions/[email protected]
140+
env:
141+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
142+
with:
143+
upload_url: ${{ steps.set_upload_url.outputs.upload_url }}
144+
asset_path: ./qtusb-${{ matrix.config.artifact }}
145+
asset_name: qtusb}-${{ matrix.config.artifact }}
146+
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)