Release 0.7.0-rc.3 #142
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: Release Binaries | |
on: | |
workflow_dispatch: | |
release: | |
types: | |
- created | |
- prereleased | |
pull_request: | |
branches: | |
- master | |
- develop | |
paths: | |
- '.github/workflows/release.yml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-bhaptics: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- bhaptics_tactsuit_x16 | |
- bhaptics_tactsuit_x16_pca9685 | |
- bhaptics_tactsuit_x40 | |
- bhaptics_tactosy2_forearm_left | |
- bhaptics_tactosy2_forearm_right | |
- bhaptics_tactosyh_hand_left | |
- bhaptics_tactosyh_hand_right | |
- bhaptics_tactosyf_foot_left | |
- bhaptics_tactosyf_foot_right | |
- bhaptics_tactal | |
- bhaptics_tactvisor | |
- bhaptics_tactglove_left | |
- bhaptics_tactglove_right | |
battery_flag: | |
- SS_BATTERY_ENABLED=true | |
nimble_flag: | |
- SS_USE_NIMBLE=true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Get firmware name | |
id: firmware_name | |
run: | | |
./.github/scripts/get_firmware_name.sh ${{ matrix.target }} | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Cache PlatformIO | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.platformio/.cache | |
./.pio | |
key: ${{ runner.os }}-pio-${{ matrix.target }}-${{ hashFiles('platformio.ini') }} | |
restore-keys: | | |
${{ runner.os }}-pio-${{ matrix.target }}- | |
${{ runner.os }}-pio- | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade platformio | |
pio upgrade --dev | |
pio pkg update --global | |
- name: Update build command (non-Windows) | |
run: | | |
sed -i '/\[env\]/p; s/\[env\]/upload_protocol = custom/' platformio.ini | |
sed -i '/\[env\]/p; s/\[env\]/upload_command = \$PYTHONEXE .\/scripts\/ci\/create-archive.py \$FLASH_EXTRA_IMAGES \$ESP32_APP_OFFSET \$SOURCE/' platformio.ini | |
- name: Update build flags (non-macOS) | |
run: | | |
sed -i '/__OH_FIRMWARE__/p; s/__OH_FIRMWARE__/${{ matrix.battery_flag }}/' platformio.ini | |
sed -i '/__OH_FIRMWARE__/p; s/__OH_FIRMWARE__/${{ matrix.nimble_flag }}/' platformio.ini | |
- name: Build | |
run: | | |
mkdir build | |
echo "::group::platformio.ini" | |
cat platformio.ini | |
echo "::endgroup::" | |
echo "::group::pio run" | |
pio run --environment ${{matrix.target}} --target upload | |
echo "::endgroup::" | |
unzip -l ./build/firmware.zip | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-${{matrix.target}} | |
path: ./build/firmware.zip | |
retention-days: 5 | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'senseshift/senseshift-firmware' | |
with: | |
asset_name: ${{matrix.target}}.zip | |
file: ./build/firmware.zip | |
tag: ${{github.ref}} | |
build-opengloves: | |
if: github.repository == 'senseshift/senseshift-firmware' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
target: | |
- lucidgloves-prototype3 | |
- lucidgloves-prototype4 | |
- lucidgloves-prototype4-ffb | |
- indexer-c | |
- indexer-cf | |
- indexer-cs | |
- indexer-csf | |
comm_flag: | |
- OPENGLOVES_COMMUNICATION=OPENGLOVES_COMM_SERIAL | |
- OPENGLOVES_COMMUNICATION=OPENGLOVES_COMM_BTSERIAL | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Get firmware name | |
id: firmware_name | |
run: | | |
./.github/scripts/get_firmware_name.sh ${{ matrix.target }} ${{ matrix.comm_flag }} | |
- name: Update build command (non-Windows) | |
run: | | |
sed -i '/\[env\]/p; s/\[env\]/upload_protocol = custom/' platformio.ini | |
sed -i '/\[env\]/p; s/\[env\]/upload_command = \$PYTHONEXE .\/scripts\/ci\/create-archive.py \$FLASH_EXTRA_IMAGES \$ESP32_APP_OFFSET \$SOURCE/' platformio.ini | |
- name: Update build flags (non-macOS) | |
run: | | |
sed -i '/__OH_FIRMWARE__/p; s/__OH_FIRMWARE__/${{ matrix.comm_flag }}/' platformio.ini | |
- name: Cache pip | |
uses: actions/cache@v4 | |
with: | |
path: ~/.cache/pip | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Cache PlatformIO | |
uses: actions/cache@v4 | |
with: | |
path: | | |
~/.platformio/.cache | |
./.pio | |
key: ${{ runner.os }}-pio-${{ matrix.target }}-${{ hashFiles('platformio.ini') }} | |
restore-keys: | | |
${{ runner.os }}-pio-${{ matrix.target }}- | |
${{ runner.os }}-pio- | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install PlatformIO | |
run: | | |
python -m pip install --upgrade pip | |
pip install --upgrade platformio | |
pio upgrade --dev | |
pio pkg update --global | |
- name: Build | |
run: | | |
mkdir build | |
echo "::group::platformio.ini" | |
cat platformio.ini | |
echo "::endgroup::" | |
echo "::group::pio run" | |
pio run --environment ${{matrix.target}} --target upload | |
echo "::endgroup::" | |
unzip -l ./build/firmware.zip | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: firmware-${{ steps.firmware_name.outputs.firmware }} | |
path: ./build/firmware.zip | |
retention-days: 5 | |
- name: Upload binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
if: startsWith(github.ref, 'refs/tags/') && github.repository == 'senseshift/senseshift-firmware' | |
with: | |
asset_name: ${{ steps.firmware_name.outputs.firmware }}.zip | |
file: ./build/firmware.zip | |
tag: ${{github.ref}} |