Deploy refs/heads/master e5b5e94fe7752f72ad5cad6bfdc2de59f84d755c #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build, Test and Release master | |
run-name: Deploy ${{ github.ref }} ${{ github.sha }} | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
Build-Hobbits: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-22.04] | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- name: Check out repo | |
uses: actions/checkout@v3 | |
with: | |
submodules: 'true' | |
- name: Determine version | |
run: | | |
cp ci/justversion.releaserc.json .releaserc.json | |
npm ci | |
npx semantic-release | |
rm .releaserc.json | |
- 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 }} | |
- name: Build | |
run: cmake --build build | |
- name: Run Tests | |
working-directory: ${{ github.workspace }}/tests | |
run: | | |
./prepare_tests.js | |
export QT_DEBUG_PLUGINS=1 | |
./test_hobbits.js ${{ github.workspace }}/build/bin/hobbits-runner -p ${{ github.workspace }}/build/plugins | |
- name: Package Build Artifacts | |
run: ninja package -C build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: DEB Packages ${{ matrix.os }} | |
path: build/hobbits-*deb* | |
Release-Hobbits: | |
needs: Build-Hobbits | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
- uses: actions/checkout@v3 | |
- uses: actions/download-artifact@v4 | |
- name: Check Files | |
run: ls -R | |
- name: Semantic Release | |
run: | | |
npm ci | |
cp ci/full.releaserc.json .releaserc.json | |
npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |