Skip to content

Commit

Permalink
Merge branch 'main' into improve-ds-interop-performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold872 authored Dec 27, 2024
2 parents 8392734 + b7e103e commit b05fd51
Show file tree
Hide file tree
Showing 135 changed files with 8,914 additions and 4,265 deletions.
136 changes: 112 additions & 24 deletions .github/workflows/elastic-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ on:
workflow_dispatch:

env:
FLUTTER_VERSION: 3.22.0
FLUTTER_VERSION: 3.22.3

jobs:
formatting-analysis:
name: "Check Formatting & Analyze"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout repo
Expand All @@ -44,10 +44,10 @@ jobs:
run: dart run import_sorter:main --exit-if-changed

- name: Analyze project source
run: flutter analyze --no-fatal-infos --no-fatal-warnings
run: flutter analyze --no-fatal-infos
test:
name: "Run Tests"
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- name: Checkout repo
Expand All @@ -63,16 +63,30 @@ jobs:
- name: Install dependencies
run: flutter pub get

- name: Install junit reporter
run: dart pub global activate junitreport

- name: Generate mocks
run: dart run build_runner build

- name: Run tests
run: flutter test --coverage
run: flutter test --coverage --file-reporter json:reports/test-report.json

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
uses: codecov/codecov-action@v5
with:
files: coverage/lcov.info
token: ${{ secrets.CODECOV_TOKEN }}

- name: Generate junit report xml
run: dart pub global run junitreport:tojunit --input reports/test-report.json --output reports/junit-report.xml

- name: Upload test reports to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
files: reports/junit-report.xml
token: ${{ secrets.CODECOV_TOKEN }}
build:
strategy:
fail-fast: false
Expand All @@ -86,12 +100,10 @@ jobs:
build-option: "macos"
artifact-path: "build/macos/Build/Products/Release/Elastic-macOS.zip"
artifact-name: Elastic-macOS
executable-type: portable
- os: ubuntu-latest
- os: ubuntu-22.04
build-option: "linux"
artifact-path: "build/linux/x64/release/bundle"
artifact-name: Elastic-Linux
executable-type: portable

name: "Build - ${{ matrix.artifact-name }}"
needs: [formatting-analysis, test]
Expand All @@ -101,11 +113,11 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install flutter dependencies
- name: Install flutter build dependencies
if: ${{ matrix.build-option == 'linux' }}
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev
sudo apt-get install -y libglu1-mesa ninja-build libgtk-3-dev liblzma-dev
- name: Setup flutter
uses: subosito/flutter-action@v2
Expand All @@ -123,18 +135,11 @@ jobs:
- name: Build app
run: flutter build ${{ matrix.build-option }}

- name: Create installer
if: ${{ matrix.build-option == 'windows' }}
uses: Minionguyjpro/[email protected]
with:
path: installer_setup_script.iss
options: /O+

- name: Zip release
if: ${{ matrix.build-option == 'macos' }}
run: |
cd build/macos/Build/Products/Release
zip -r Elastic-macOS.zip elastic_dashboard.app --symlinks
zip -r ${{ matrix.artifact-name }}.zip elastic_dashboard.app --symlinks
- name: Upload artifact
if: ${{ matrix.build-option != 'windows' }}
Expand All @@ -144,18 +149,101 @@ jobs:
path: ${{ matrix.artifact-path }}
if-no-files-found: error

- name: Upload artifact (Windows portable)
- name: Upload windows portable
if: ${{ matrix.build-option == 'windows' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}_portable
path: ${{ matrix.artifact-path }}
if-no-files-found: error

- name: Upload artifact (Windows installer)
- name: Create macOS installer
if: ${{ matrix.build-option == 'macos' }}
uses: L-Super/[email protected]
with:
dmg_name: build/macos/Build/Products/Release/elastic-setup
src_dir: build/macos/Build/Products/Release/elastic_dashboard.app

- name: Upload macOS installer
if: ${{ matrix.build-option == 'macos' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}_installer
path: build/macos/Build/Products/Release/elastic-setup.dmg
if-no-files-found: error

- name: Create windows installer
if: ${{ matrix.build-option == 'windows' }}
uses: Minionguyjpro/[email protected]
with:
path: installer_setup_script.iss
options: /O+

- name: Upload windows installer
if: ${{ matrix.build-option == 'windows' }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}_installer
path: "build/windows/x64/installer"
if-no-files-found: error
if-no-files-found: error

build-wpilib:
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
build-option: "windows"
artifact-path: "build/windows/x64/runner/Release"
artifact-name: Elastic-WPILib-Windows
- os: macos-latest
build-option: "macos"
artifact-path: "build/macos/Build/Products/Release/Elastic-WPILib-macOS.tar.gz"
artifact-name: Elastic-WPILib-macOS
- os: ubuntu-22.04
build-option: "linux"
artifact-path: "build/linux/x64/release/bundle"
artifact-name: Elastic-WPILib-Linux

name: "Build - ${{ matrix.artifact-name }}"
needs: [formatting-analysis, test]
runs-on: ${{ matrix.os }}

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Install flutter build dependencies
if: ${{ matrix.build-option == 'linux' }}
run: |
sudo apt-get update -y
sudo apt-get install -y libglu1-mesa ninja-build libgtk-3-dev liblzma-dev
- name: Setup flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
cache-path: ${{ runner.tool_cache }}/flutter/${{ matrix.build-option }}

- name: Install dependencies
run: flutter pub get

- name: Generate icons
run: dart run flutter_launcher_icons -f wpilib_icon_config.yaml

- name: Build app
run: flutter build ${{ matrix.build-option }} --dart-define=ELASTIC_WPILIB=true

- name: Zip release
if: ${{ matrix.build-option == 'macos' }}
run: |
cd build/macos/Build/Products/Release
tar -zcvf ${{ matrix.artifact-name }}.tar.gz elastic_dashboard.app
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-path }}
if-no-files-found: error
32 changes: 32 additions & 0 deletions .github/workflows/elasticlib-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ElasticLib

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

jobs:
wpiformat-analyze:
name: "Verify Formatting"
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all history and metadata
run: |
git checkout -b pr
git branch -f main origin/main
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: 3.8
- name: Install wpiformat
run: pip3 install wpiformat==2024.50
- name: Run wpiformat
run: wpiformat -f Elastic.java elasticlib.h elasticlib.cpp elasticlib.py
working-directory: ./elasticlib
- name: Check output
run: git --no-pager diff --exit-code HEAD
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
migrate_working_dir/
coverage/
*.mocks.dart
reports/

# IntelliJ related
*.iml
Expand All @@ -21,7 +22,7 @@ coverage/
# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/
.vscode/

# Flutter/Dart/Pub related
**/doc/api/
Expand Down
21 changes: 21 additions & 0 deletions PRIVACY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Privacy Policy

Elastic is a volunteer-run project that is owned and published by Nadav from FIRST Robotics Competition Team 353 ("Elastic"), based in the United States.

## Information We Collect

Elastic does not collect data from users of the application.

The Elastic application will create and store logs of application errors and user interactions on the user's system, but these logs are not shared unless it's done manually by the user.

## Third-Party Data Collection

The Elastic repository and documentation site are hosted by GitHub, which publishes a [privacy policy](https://docs.github.com/en/site-policy/privacy-policies/github-general-privacy-statement) that applies when interacting with these services.

The Elastic application may connect to GitHub services to check for updates. These interactions are covered by the GitHub privacy policy.

The documentation for Elastic is hosted on GitBook, which has a [privacy policy](https://policies.gitbook.com/privacy-and-security/statement) that applies when interacting with their services.

## Contact

Questions about this policy can be directed to [email protected]
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ![Elastic Logo](assets/logos/logo_full.png)

[![Elastic](https://github.com/Gold872/elastic-dashboard/actions/workflows/elastic-ci.yml/badge.svg)](https://github.com/Gold872/elastic-dashboard/actions/workflows/elastic-ci.yml)
[![Elastic](https://github.com/Gold872/elastic-dashboard/actions/workflows/elastic-ci.yml/badge.svg)](https://github.com/Gold872/elastic-dashboard/actions/workflows/elastic-ci.yml) [![codecov](https://codecov.io/gh/Gold872/elastic-dashboard/graph/badge.svg?token=4MQYW8SMQI)](https://codecov.io/gh/Gold872/elastic-dashboard)

A simple and modern dashboard for FRC.

Expand All @@ -23,7 +23,7 @@ Elastic is a simple and modern Shuffleboard alternative made by Team 353. It is
![Example Layout](/screenshots/example_layout.png)

## Documentation
View the online documentation [here](https://github.com/Gold872/elastic-dashboard/wiki)
View the online documentation [here](https://frc-elastic.gitbook.io/docs)

## Special Thanks

Expand All @@ -41,4 +41,4 @@ This dashboard wouldn't have been made without the help and inspiration from the
* [Rapid React](https://www.chiefdelphi.com/t/2022-top-down-field-renders/399031)
* [Charged Up](https://www.chiefdelphi.com/t/2023-top-down-field-renders/421365)
* [Crescendo](https://www.chiefdelphi.com/t/2024-crescendo-top-down-field-renders/447764)
* All mentors and advisors of Team 353, the POBots
* All mentors and advisors of Team 353, the POBots
Binary file modified assets/fields/2018-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fields/2019-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fields/2020-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fields/2022-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fields/2023-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/fields/2024-field.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/logos/wpilib_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/wpilib-icon.ico
Binary file not shown.
Loading

0 comments on commit b05fd51

Please sign in to comment.