Skip to content

Commit

Permalink
wahoo
Browse files Browse the repository at this point in the history
Signed-off-by: swurl <[email protected]>
  • Loading branch information
crueter authored and swirl committed Dec 1, 2023
1 parent 298539b commit a3b24a1
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 74 deletions.
13 changes: 0 additions & 13 deletions .github/patches/Protobuf-Fix.patch

This file was deleted.

72 changes: 57 additions & 15 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,13 @@ jobs:
uses: actions/checkout@v4
with:
repository: 'wpilibsuite/allwpilib'
# ref: 'v2024.1.1-beta-3' # MAY want 2023
ref: '9b8011aa67e30f150862545758056ff4d0cc0eac' # MAY want 2023
path: 'allwpilib'

- name: 'Prepare ntcore'
run: |
cd allwpilib
git apply ../.github/patches/No-Werror.patch
git apply ../.github/patches/Protobuf-Fix.patch
cd ..
- name: 'Install Python Dependencies (Linux)'
Expand Down Expand Up @@ -143,13 +142,20 @@ jobs:
./linuxdeploy-x86_64.AppImage --appdir ${{ env.INSTALL_APPIMAGE_DIR }} --output appimage --plugin qt
- name: Upload binary tarball (Linux)
- name: Upload portable tarball (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: QFRCDashboard-${{ runner.os }}-Qt6-${{ env.VERSION }}-${{ inputs.build_type }}
name: QFRCDashboard-${{ runner.os }}-Binary-${{ env.VERSION }}-${{ inputs.build_type }}
path: QFRCDashboard.tar.gz

- name: Upload system dir (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
with:
name: QFRCDashboard-${{ runner.os }}-System-${{ env.VERSION }}-${{ inputs.build_type }}
path: ${{ env.INSTALL_APPIMAGE_DIR }}/**

- name: Upload AppImage (Linux)
if: runner.os == 'Linux'
uses: actions/upload-artifact@v3
Expand All @@ -167,6 +173,7 @@ jobs:
BUILD_WIN_DIR: "winbuild"
INSTALL_WIN_DIR: "install-win"
NTCORE_INSTALL_DIR: "install-ntcore"
PROTOBUF_INSTALL_DIR: "install-protobuf"

steps:
- uses: ilammy/msvc-dev-cmd@v1
Expand All @@ -182,18 +189,25 @@ jobs:
- name: Run sccache-cache
uses: mozilla-actions/[email protected]

- name: 'Install Qt (Windows)'
uses: jurplel/[email protected]
with:
version: 6.6.0
modules: qtmultimedia

- name: Install jinja
run: |
python -m ensurepip
python -m pip install jinja2
dir ..\Qt\6.6.0\msvc2019_64\bin
- uses: actions/checkout@v3

- name: 'Checkout wpilib'
uses: actions/checkout@v4
with:
repository: 'wpilibsuite/allwpilib'
# ref: 'v2024.1.1-beta-3' # MAY want 2023
ref: '9b8011aa67e30f150862545758056ff4d0cc0eac' # MAY want 2023
path: 'allwpilib'

- name: Run vcpkg
Expand All @@ -207,12 +221,11 @@ jobs:
run: |
cd allwpilib
git apply ../.github/patches/No-Werror.patch
git apply ../.github/patches/Protobuf-Fix.patch
cd ..
- name: 'Configure ntcore CMake (Windows)'
run: |
cmake -S allwpilib -B win-nt-build -G "Ninja" -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=Release -DWITH_JAVA=OFF -DWITH_EXAMPLES=OFF -DUSE_SYSTEM_FMTLIB=ON -DUSE_SYSTEM_LIBUV=ON -DUSE_SYSTEM_EIGEN=ON -DWITH_CSCORE=OFF -DWITH_NTCORE=ON -DWITH_WPIMATH=OFF -DWITH_WPILIB=OFF -DWITH_TESTS=OFF -DWITH_GUI=OFF -DWITH_SIMULATION_MODULES=OFF -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/allwpilib/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_INSTALL_OPTIONS=--clean-after-build -DVCPKG_TARGET_TRIPLET=x64-windows-release -DVCPKG_HOST_TRIPLET=x64-windows-release -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }}
cmake -S allwpilib -B win-nt-build -G "Ninja" -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=Release -DWITH_JAVA=OFF -DWITH_EXAMPLES=OFF -DUSE_SYSTEM_FMTLIB=OFF -DUSE_SYSTEM_LIBUV=OFF -DUSE_SYSTEM_EIGEN=OFF -DWITH_CSCORE=OFF -DWITH_NTCORE=ON -DWITH_WPIMATH=OFF -DWITH_WPILIB=OFF -DWITH_TESTS=OFF -DWITH_GUI=OFF -DWITH_SIMULATION_MODULES=OFF -DCMAKE_TOOLCHAIN_FILE=${{ runner.workspace }}/allwpilib/vcpkg/scripts/buildsystems/vcpkg.cmake -DVCPKG_INSTALL_OPTIONS=--clean-after-build -DVCPKG_TARGET_TRIPLET=x64-windows-release -DVCPKG_HOST_TRIPLET=x64-windows-release -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_DIR }}
env:
SCCACHE_GHA_ENABLED: "true"

Expand All @@ -229,30 +242,59 @@ jobs:
env:
SCCACHE_GHA_ENABLED: "true"

- name: 'Install Qt (Windows)'
uses: jurplel/[email protected]
- name: 'Checkout protobuf'
uses: actions/checkout@v4
with:
version: 6.6.0
modules: qtmultimedia
repository: 'protocolbuffers/protobuf'
# ref: 'v2024.1.1-beta-3' # MAY want 2023
path: 'protobuf'

- name: 'Prepare protobuf (Windows)'
working-directory: protobuf
run: |
git submodule update --init --recursive
- name: 'Configure protobuf CMake (Windows)'
run: |
cmake -S protobuf -B win-pb-build -G "Ninja" -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ env.INSTALL_PROTOBUF_DIR }} -Dprotobuf_ALLOW_CCACHE=ON -Dprotobuf_BUILD_TESTS=OFF
env:
SCCACHE_GHA_ENABLED: "true"

- name: 'Build protobuf (Windows)'
working-directory: win-pb-build
run: |
cmake --build . --parallel $(nproc)
env:
SCCACHE_GHA_ENABLED: "true"

- name: 'Install protobuf (Windows)'
run: |
cmake --install win-pb-build --prefix ${{ env.PROTOBUF_INSTALL_DIR }}
env:
SCCACHE_GHA_ENABLED: "true"

- name: 'Build (Windows)'
run: |
cmake -S . -B ${{ env.BUILD_WIN_DIR }} -Dntcore_ROOT=${{ env.NTCORE_INSTALL_DIR }}
cmake -S . -B ${{ env.BUILD_WIN_DIR }} -Dntcore_ROOT=${{ env.NTCORE_INSTALL_DIR }} -DProtobuf_ROOT=${{ env.PROTOBUF_INSTALL_DIR }} -DCMAKE_CXX_FLAGS="/I${{ runner.workspace }}\QFRCDashboard\${{ env.NTCORE_INSTALL_DIR }}\include /MT" -G "Ninja" -DBUILD_SHARED_LIBS=OFF
cmake --build ${{ env.BUILD_WIN_DIR }} --parallel $(nproc)
env:
SCCACHE_GHA_ENABLED: "true"

- name: Package (Windows)
shell: cmd
run: |
cmake --install ${{ env.BUILD_WIN_DIR }} --prefix ${{ env.INSTALL_WIN_DIR }} --component portable
mkdir ${{ env.INSTALL_WIN_DIR }}
set PATH=%PATH%;"${{ runner.workspace }}\Qt\6.6.0\msvc2019_64\bin"
windeployqt ${{ env.BUILD_WIN_DIR }}\QFRCDashboard.exe --dir ${{ env.INSTALL_WIN_DIR }}
cp ${{ env.BUILD_WIN_DIR }}\QFRCDashboard.exe ${{ env.INSTALL_WIN_DIR }}
##
# UPLOAD BUILDS
##

- name: Upload binary zip (Windows, portable)
if: runner.os == 'Windows'
uses: actions/upload-artifact@v3
with:
name: QFRCDashboard-${{ matrix.name }}-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
name: QFRCDashboard-Windows-Portable-${{ env.VERSION }}-${{ inputs.build_type }}
path: ${{ env.INSTALL_WIN_DIR }}/**
4 changes: 3 additions & 1 deletion .github/workflows/trigger_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
mv ${{ github.workspace }}/QFRCDashboard-source QFRCDashboard-${{ env.VERSION }}
mv QFRCDashboard-Linux*/QFRCDashboard.tar.gz QFRCDashboard-Linux-${{ env.VERSION }}.tar.gz
mv QFRCDashboard-*.AppImage/QFRCDashboard-*.AppImage QFRCDashboard-Linux-${{ env.VERSION }}-x86_64.AppImage
mv QFRCDashboard-Windows*/QFRCDashboard* QFRCDashboard-Windows-${{ env.VERSION }}.zip
tar -czf QFRCDashboard-${{ env.VERSION }}.tar.gz QFRCDashboard-${{ env.VERSION }}
Expand All @@ -57,7 +58,8 @@ jobs:
draft: true
prerelease: false
files: |
QFRCDashboard-Linux-${{ env.VERSION }}.tar.gz
QFRCDashboard-Linux-Binary-${{ env.VERSION }}.tar.gz
QFRCDashboard-Linux-System-${{ env.VERSION }}.tar.gz
QFRCDashboard-Linux-${{ env.VERSION }}-x86_64.AppImage
QFRCDashboard-Windows-Portable-${{ env.VERSION }}.zip
# QFRCDashboard-${{ env.VERSION }}.tar.gz
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

option(BUILD_SHARED_LIBS "Build using shared libraries" ON)

find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets MultimediaWidgets)
find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets MultimediaWidgets)
find_package(ntcore REQUIRED)
Expand Down
4 changes: 2 additions & 2 deletions QFRCDashboard.rc
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
#include <windows.h>

IDI_ICON1 ICON DISCARDABLE "QFRCDashboard.ico"
1 RT_MANIFEST "QFRCDashboard.manifest"
10255 RT_MANIFEST "QFRCDashboard.manifest"

VS_VERSION_INFO VERSIONINFO
FILEVERSION @Launcher_VERSION_NAME4_COMMA@
FILEVERSION 0.9.0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
BEGIN
Expand Down
3 changes: 2 additions & 1 deletion include/Globals.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include "networktables/NetworkTableInstance.h"
#include <ntcore/networktables/NetworkTableInstance.h>

#include <QString>
#include <QMap>
Expand Down Expand Up @@ -98,3 +98,4 @@ namespace CustomMetaTypes {
static const int FrameShape = qMetaTypeId<Globals::FrameShape>();
static const int File = qMetaTypeId<Globals::File>();
}

39 changes: 0 additions & 39 deletions include/RobotDiagnostics.h

This file was deleted.

2 changes: 1 addition & 1 deletion src/MainWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "misc/NTSettingsDialog.h"
#include "misc/WidgetDialogGenerator.h"

#include "ntcore/networktables/NetworkTableInstance.h"
#include <ntcore/networktables/NetworkTableInstance.h>

#include <QToolBar>
#include <QMenuBar>
Expand Down
2 changes: 0 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include "ntcore_cpp.h"

#include <QApplication>
#include <QTimer>
#include <QRadioButton>
Expand Down

0 comments on commit a3b24a1

Please sign in to comment.