mirror of
https://github.com/ByteWelder/Tactility.git
synced 2026-02-18 10:53:17 +00:00
Add macOS simulator build to pipelines (#162)
- GitHub actions changed to build simulator on macOS (it's broken, but at least we get a good code portability check for now!) - `Buildscripts/` shell scripts updated to use `/bin/sh` so it works on macOS too - Various includes fixed in various subprojects so the code is more portable
This commit is contained in:
parent
431fa84ffb
commit
5d189fe5a3
6
.github/actions/build-simulator/action.yml
vendored
6
.github/actions/build-simulator/action.yml
vendored
@ -7,6 +7,9 @@ inputs:
|
||||
platform_name:
|
||||
description: A descriptive name for the target platform (e.g. amd64, aarch64, etc.)
|
||||
required: true
|
||||
publish:
|
||||
description: A boolean that enables publishing of artifacts
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@ -16,7 +19,7 @@ runs:
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux Dependencies for SDL
|
||||
if: ${{ inputs.platform_name }} == 'linux'
|
||||
if: ${{ runner.os == 'Linux' }}
|
||||
shell: bash
|
||||
# See Libraries/SDL/docs/README-linux.md
|
||||
run: >
|
||||
@ -45,6 +48,7 @@ runs:
|
||||
run: Buildscripts/release-simulator.sh buildsim release/Simulator-${{ inputs.os_name }}-${{ inputs.platform_name }}
|
||||
- name: 'Upload Artifact'
|
||||
uses: actions/upload-artifact@v4
|
||||
if: ${{ inputs.publish == 'true' }}
|
||||
with:
|
||||
name: Simulator-${{ inputs.os_name }}-${{ inputs.platform_name }}
|
||||
path: release/Simulator-${{ inputs.os_name }}-${{ inputs.platform_name }}
|
||||
|
||||
14
.github/workflows/build-simulator.yml
vendored
14
.github/workflows/build-simulator.yml
vendored
@ -2,7 +2,7 @@
|
||||
name: Build Simulator
|
||||
on: [push]
|
||||
jobs:
|
||||
Build-Simulator:
|
||||
Build-Simulator-Linux:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
@ -11,3 +11,15 @@ jobs:
|
||||
with:
|
||||
os_name: linux
|
||||
platform_name: amd64
|
||||
publish: true
|
||||
Build-Simulator-macOS:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: "Build"
|
||||
uses: ./.github/actions/build-simulator
|
||||
with:
|
||||
os_name: macos
|
||||
platform_name: aarch64
|
||||
# macOS simulator currently fails due to main thread requirement for rendering
|
||||
publish: false
|
||||
|
||||
@ -11,15 +11,15 @@ class SimulatorPower : public Power {
|
||||
|
||||
public:
|
||||
|
||||
SimulatorPower() {}
|
||||
~SimulatorPower() {}
|
||||
SimulatorPower() = default;
|
||||
~SimulatorPower() override = default;
|
||||
|
||||
bool supportsMetric(MetricType type) const override;
|
||||
bool getMetric(Power::MetricType type, Power::MetricData& data) override;
|
||||
|
||||
bool supportsChargeControl() const { return true; }
|
||||
bool isAllowedToCharge() const { return allowedToCharge; }
|
||||
void setAllowedToCharge(bool canCharge) { allowedToCharge = canCharge; }
|
||||
bool supportsChargeControl() const override { return true; }
|
||||
bool isAllowedToCharge() const override { return allowedToCharge; }
|
||||
void setAllowedToCharge(bool canCharge) override { allowedToCharge = canCharge; }
|
||||
};
|
||||
|
||||
std::shared_ptr<Power> simulatorPower();
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
# Usage:
|
||||
# flash.sh [port]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
function build() {
|
||||
Buildscripts/build.sh $1
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Usage: build.sh [boardname]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Description: Releases the current build files as an SDK in release/TactilitySDK
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Usage: release-sdk.sh [target_path]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/usr/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Usage: release-simulator.sh [builddir] [target_path]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Usage: release.sh [boardname]
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
#!/bin/sh
|
||||
|
||||
cmake -S ./ -B build-sim
|
||||
cmake --build build-sim --target build-tests -j 14
|
||||
|
||||
@ -70,7 +70,6 @@ if (NOT DEFINED ENV{ESP_IDF_VERSION})
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED ENV{ESP_IDF_VERSION})
|
||||
|
||||
# FreeRTOS
|
||||
set(FREERTOS_CONFIG_FILE_DIRECTORY ${PROJECT_SOURCE_DIR}/Boards/Simulator/Source CACHE STRING "")
|
||||
set(FREERTOS_PORT GCC_POSIX CACHE STRING "")
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
#include "FileUtils.h"
|
||||
#include "TactilityCore.h"
|
||||
#include <cstring>
|
||||
#include <bits/stdc++.h>
|
||||
#include <StringUtils.h>
|
||||
|
||||
namespace tt::app::files {
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
#include <cstring>
|
||||
#include "app/alertdialog/AlertDialog.h"
|
||||
#include "app/imageviewer/ImageViewer.h"
|
||||
#include "app/inputdialog/InputDialog.h"
|
||||
@ -11,7 +10,8 @@
|
||||
#include "Tactility.h"
|
||||
#include "View.h"
|
||||
#include "StringUtils.h"
|
||||
#include <filesystem>
|
||||
#include <cstring>
|
||||
#include <unistd.h>
|
||||
|
||||
#define TAG "files_app"
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@
|
||||
#include "StringUtils.h"
|
||||
#include <iomanip>
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
|
||||
namespace tt::app::i2cscanner {
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
#include "hal/Touch.h"
|
||||
#include "hal/Keyboard.h"
|
||||
#include "lvgl/LvglKeypad.h"
|
||||
#include "lvgl/Lvgl.h"
|
||||
#include "lvgl/LvglDisplay.h"
|
||||
#include "kernel/SystemEvents.h"
|
||||
|
||||
namespace tt::lvgl {
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
#include "lvgl/Lvgl.h"
|
||||
#include "lvgl/LvglDisplay.h"
|
||||
#include "Check.h"
|
||||
|
||||
namespace tt::lvgl {
|
||||
@ -1,5 +1,6 @@
|
||||
#include "Mutex.h"
|
||||
#include <cstring>
|
||||
#include <sstream>
|
||||
|
||||
namespace tt {
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#pragma once
|
||||
|
||||
#include <bits/stdc++.h>
|
||||
#include <algorithm>
|
||||
#include <cstdio>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user