Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows build #172

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 31 additions & 14 deletions .github/workflows/dev-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,49 @@ run-name: Build ${{ github.ref }} ${{ github.sha }}
on:
push:
branches:
- develop
- '*'
- '!master'
pull_request:
branches:
- develop
jobs:
Build-Hobbits:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04]
matrix:
sys:
- { os: windows-latest, shell: 'msys2 {0}' }
- { os: ubuntu-22.04, shell: bash }

runs-on: ${{ matrix.sys.os }}
defaults:
run:
shell: ${{ matrix.sys.shell }}

steps:
- uses: actions/setup-node@v3
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 'latest'

- name: Install Dependencies (Ubuntu)
if: matrix.sys.os == 'ubuntu-22.04'
run: sudo apt-get install -y patchelf qtchooser qt5-qmake qtbase5-dev-tools ninja-build cmake g++ libusb-1.0-0-dev libpcap-dev qtbase5-dev python3-dev

- name: Install Dependencies (Windows)
if: matrix.sys.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
node-version: 14
path-type: inherit
msystem: UCRT64
install: git mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-qt5-base mingw-w64-ucrt-x86_64-libusb mingw-w64-ucrt-x86_64-libpcap

- name: Check out repo
uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install Build Tools
run: sudo apt-get install -y patchelf qtchooser qt5-qmake qtbase5-dev-tools ninja-build cmake g++
- name: Install Development Libraries
run: sudo apt-get install -y libusb-1.0-0-dev libpcap-dev qtbase5-dev python3-dev

- name: Run CMake
run: cmake -G Ninja -B build -S ${{ github.workspace }}
run: cmake -G Ninja -B build -S "${{ github.workspace }}"
- name: Build
run: cmake --build build

Expand All @@ -38,12 +55,12 @@ jobs:
cd tests
./prepare_tests.js
export QT_DEBUG_PLUGINS=1
./test_hobbits.js ${{ github.workspace }}/build/bin/hobbits-runner -p ${{ github.workspace }}/build/plugins
./test_hobbits.js "${{ github.workspace }}/build/bin/hobbits-runner" -p "${{ github.workspace }}/build/plugins"
cd ${{ github.workspace }}

- name: Package Build Artifacts
run: ninja package -C build
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: DEB Packages ${{ matrix.os }}
path: build/hobbits-*deb*
Expand All @@ -54,7 +71,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4

- name: Check Files
run: ls -R
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [0.54.1](https://github.com/Mahlet-Inc/hobbits/compare/v0.54.0...v0.54.1) (2024-04-30)


### Bug Fixes

* add versionless Qt build compatibility ([2d58fb2](https://github.com/Mahlet-Inc/hobbits/commit/2d58fb2f61cc2b20ac2a901325ad54422ec03215))

# [0.54.0](https://github.com/Mahlet-Inc/hobbits/compare/v0.53.4...v0.54.0) (2023-02-17)


Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hobbits",
"version": "0.54.0",
"version": "0.54.1",
"private": true,
"config": {
"commitizen": {
Expand Down
4 changes: 2 additions & 2 deletions tests/test_hobbits.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env node

const { readdirSync, unlinkSync, existsSync } = require('fs')
const { join } = require('path')
const { join, normalize } = require('path')
const { execFileSync } = require("child_process");
const glob = require('glob');
const filecompare = require('filecompare');
Expand All @@ -26,7 +26,7 @@ async function runTests() {
let failures = 0;
let successes = 0;

let baseDir = join(__dirname, 'extracted_tests')
let baseDir = join(normalize(__dirname), 'extracted_tests')

testDirs = readdirSync(baseDir, { withFileTypes: true })
.filter(dirent => dirent.isDirectory())
Expand Down
Loading