Skip to content

Commit

Permalink
Switch to Gitlab Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
fpoussin committed Oct 28, 2024
1 parent ea6d509 commit 050f05c
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 130 deletions.
146 changes: 146 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
name: QMake Build Matrix

on: [push]

env:
QT_VERSION: 6.8.0

jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
# - {
# name: "Windows Latest x64",
# artifact: "Windows-x64.zip",
# arch: win64_msvc2022_64,
# os: windows-latest,
# environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
# }
- {
name: "Linux Latest x64",
artifact: "Linux-x64.zip",
arch: "",
os: ubuntu-latest
}
# - {
# name: "macOS Latest x64",
# artifact: "macOS-x64.zip",
# arch: "",
# os: macos-latest
# }

steps:
- uses: actions/checkout@v1

- name: Installing system libs on Ubuntu
# if: ${{ startsWith(matrix.config.os, 'ubuntu') }}
shell: cmake -P {0}
run: |
if ("${{ runner.os }}" STREQUAL "Linux")
execute_process(
COMMAND sudo apt install libusb-1.0-0-dev libhidapi-dev
)
endif()
- name: Download Qt
id: qt
uses: jurplel/install-qt-action@v4
with:
version: "${{ env.QT_VERSION }}"
arch: "${{ matrix.config.arch }}"

- name: Configure
run: |
cmake -S . -B ./build
- name: Build
run: |
make
- uses: actions/upload-artifact@v4
id: upload_artifact
with:
path: ./qtusb-${{ matrix.config.artifact }}
name: qtusb-${{ matrix.config.artifact }}

release:
if: contains(github.ref, 'tags/v')
runs-on: ubuntu-latest
needs: build

steps:
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: false

- name: Store Release url
run: |
echo "${{ steps.create_release.outputs.upload_url }}" > ./upload_url
- uses: actions/upload-artifact@v1
with:
path: ./upload_url
name: upload_url

publish:
if: contains(github.ref, 'tags/v')

name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
strategy:
matrix:
config:
# - {
# name: "Windows Latest x64",
# artifact: "Windows-x64.zip",
# os: windows-latest
# }
- {
name: "Linux Latest x64",
artifact: "Linux-x64.zip",
os: ubuntu-latest
}
# - {
# name: "macOS Latest x64",
# artifact: "macOS-x64.zip",
# os: macos-latest
# }
needs: release

steps:
- name: Download artifact
uses: actions/download-artifact@v1
with:
name: ${{ env.PLUGIN_NAME }}-${{ env.QT_CREATOR_VERSION }}-${{ matrix.config.artifact }}
path: ./

- name: Download URL
uses: actions/download-artifact@v1
with:
name: upload_url
path: ./
- id: set_upload_url
run: |
upload_url=`cat ./upload_url`
echo ::set-output name=upload_url::$upload_url
- name: Upload to Release
id: upload_to_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.set_upload_url.outputs.upload_url }}
asset_path: ./qtusb-${{ matrix.config.artifact }}
asset_name: qtusb}-${{ matrix.config.artifact }}
asset_content_type: application/zip
12 changes: 0 additions & 12 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.16)

include(.cmake.conf)
project(QtUsb
VERSION 6.4.0 # FIXME: this needs to match host's Qt version
VERSION 6.8.0 # FIXME: this needs to match host's Qt version
DESCRIPTION "A cross-platform USB Module for Qt."
HOMEPAGE_URL "https://github.com/fpoussin/QtUsb"
LANGUAGES CXX C
Expand Down
38 changes: 0 additions & 38 deletions Jenkinsfile

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# 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)
# QtUsb [![GitHub version](https://badge.fury.io/gh/fpoussin%2Fqtusb.svg)](https://badge.fury.io/gh/fpoussin%2Fqtusb)


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

A Cross-platform USB Module for Qt built around libusb-1.0 and libhidapi
Can be used as a library, or included directly into the project
Expand Down
75 changes: 0 additions & 75 deletions appveyor.yml

This file was deleted.

0 comments on commit 050f05c

Please sign in to comment.