diff --git a/.github/workflows/artifact-links.yml b/.github/workflows/artifact-links.yml new file mode 100644 index 0000000..857ad5f --- /dev/null +++ b/.github/workflows/artifact-links.yml @@ -0,0 +1,26 @@ +name: Artifact links comments creator +on: + workflow_run: + workflows: ["PR"] + types: [completed] + +jobs: + artifacts-url-comments: + name: Add artifact links to PR and issues + runs-on: ubuntu-22.04 + steps: + - name: Get information about the original PR + uses: potiuk/get-workflow-origin@v1_5 + id: get-info + with: + token: ${{ secrets.GITHUB_TOKEN }} + sourceRunId: ${{ github.event.workflow_run.id }} + - name: Add artifact links to PR and issues + uses: tonyhallett/artifacts-url-comments@v1.1.0 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + prefix: "**Do you want to test this code? Here you have an automated build:**" + suffix: "_**WARNING:** It may be unstable. Use only for testing!_" + format: name + addTo: pull diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a4f4786 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: CI + +on: + workflow_call: + +jobs: + build: + name: Build (${{ matrix.name }}) + runs-on: ${{ matrix.os }} + strategy: + matrix: + include: + - name: Linux + os: ubuntu-22.04 + + - name: macOS + os: macos-11 + + steps: + - uses: actions/checkout@v3 + + - name: Build the tools + run: make all + + - name: Publish build artifacts + uses: actions/upload-artifact@v3 + with: + name: Blackbox tools artifacts ${{matrix.name}} + path: obj/* + retention-days: 60 diff --git a/.github/workflows/hide-artifact-links.yml b/.github/workflows/hide-artifact-links.yml new file mode 100644 index 0000000..c65c684 --- /dev/null +++ b/.github/workflows/hide-artifact-links.yml @@ -0,0 +1,16 @@ +name: Hide artifact links comments + +on: + pull_request_target: + types: [synchronize, reopened] + +jobs: + hide-artifacts-link-comments: + name: Hide artifact links + runs-on: ubuntu-22.04 + steps: + - name: Hide comments + uses: int128/hide-comment-action@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + starts-with: "**Do you want to test this code? Here you have an automated build:**" diff --git a/.github/workflows/manual-build.yml b/.github/workflows/manual-build.yml new file mode 100644 index 0000000..a9506f0 --- /dev/null +++ b/.github/workflows/manual-build.yml @@ -0,0 +1,10 @@ +name: Manual Build +run-name: Manual Build ${{ github.ref_name }} + +on: + workflow_dispatch: + +jobs: + ci: + name: CI + uses: ./.github/workflows/ci.yml diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml new file mode 100644 index 0000000..77ee0cd --- /dev/null +++ b/.github/workflows/nightly.yml @@ -0,0 +1,11 @@ +name: Nightly + +on: + push: + branches: + - master + +jobs: + ci: + name: CI + uses: ./.github/workflows/ci.yml diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml new file mode 100644 index 0000000..f00206e --- /dev/null +++ b/.github/workflows/no-response.yml @@ -0,0 +1,17 @@ +name: No Response + +on: + issue_comment: + types: [created] + schedule: + - cron: 0 4 * * * + +jobs: + no-response: + runs-on: ubuntu-latest + steps: + - uses: lee-dohm/no-response@9bb0a4b5e6a45046f00353d5de7d90fb8bd773bb # v0.5.0 + with: + daysUntilClose: 1 + responseRequiredLabel: Missing Information + token: ${{ github.token }} diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml new file mode 100644 index 0000000..c207e7e --- /dev/null +++ b/.github/workflows/pr.yml @@ -0,0 +1,12 @@ +name: PR + +on: + pull_request: + branches: + - master + - '*-maintenance' + +jobs: + ci: + name: CI + uses: ./.github/workflows/ci.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 939edab..0000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ -os: - - linux - -sudo: false - -dist: trusty - -addons: - apt: - packages: - - build-essential - - git - - libc6-i386 - - time - -git: - depth: 5 - -language: c -compiler: gcc - -before_script: - - gcc --version - -script: - - make - -# Notifications are encrypted to betaflight/betaflight to avoid spam from forks -# Command: `travis encrypt "" --com -r betaflight/blackbox-tools` -notifications: - slack: - rooms: - - secure: hJ/bhQW2dvG9uxyknce4ntQ65IwLEW6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+fwwSI7zJq0v0VVi2i7QnHat84a69tI1WoTeuuqsImIH2wOToziUFYZ+USWtTLxEbyPPUYazX1Oim0e9ZG9Ty4Y0MpUY77sZG/KUZx9Dfc734Q639suONqGlbDljzgauHaP0fI4c6hVH8W7PWcv/+cMxuyDuje87a1kRBA5uI3oUx+w9Ml+zWfIT/CF2oNc6oq50MxVG3sjahP3B+IWpCv5QeN7KgjPuWwhOzdKS9x13m+RWF/+K25+a7+I3PKgsbfbgfBU3H6R8xF+hE= - on_success: always # options: [always|never|change] default: always - on_failure: always # options: [always|never|change] default: always - on_start: always # options: [always|never|change] default: always diff --git a/Readme.md b/Readme.md index cd59eaf..d29497e 100644 --- a/Readme.md +++ b/Readme.md @@ -1,5 +1,8 @@ # Blackbox flight data recorder tools +[![Build](https://img.shields.io/github/actions/workflow/status/betaflight/blackbox-tools/nightly.yml?branch=master)](https://github.com/betaflight/blackbox-tools/actions/workflows/nightly.yml) [![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) + + ![Rendered flight log frame](screenshots/blackbox-screenshot-1.jpg) ## Introduction