blink1-tool/.github/workflows/linux.yml

96 lines
2.5 KiB
YAML

# This is a basic workflow to help you get started with Actions
name: linux
# Controls when the action will run. Triggers the workflow
# on push or pull request events but only for the master branch
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
# A workflow run is made of jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
runs-on: ubuntu-latest
# Steps represent a sequence of tasks executed as part of the job
steps:
# Checks-out your repo under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: setup prerequisites (linux)
shell: bash
run: |
sudo apt update
sudo apt install build-essential pkg-config libudev-dev libusb-1.0-0-dev
- name: Compile blink1-tool (libusb test)
shell: bash
run: make HIDAPI_TYPE=LIBUSB
- name: Compile blink1-tool (hidraw)
shell: bash
run: make clean && make
- name: Package blink1-tool
shell: bash
run: make package
- name: Look at dir
shell: bash
run: ls -al
- name: Upload blink1-tool artifact
uses: actions/upload-artifact@v3
with:
name: blink1-tool-artifacts
path: blink1*.zip
# retention-days: 5
- name: Compile blink1-tiny-server
shell: bash
run: make blink1-tiny-server
- name: Upload blink1-tiny-server artifacts
uses: actions/upload-artifact@v3
with:
name: blink1-tiny-server-artifacts
path: blink1*.zip
# retention-days: 5
- name: Compile blink1control-tool
shell: bash
run: make blink1control-tool
- name: Package blink1control-tool
shell: bash
run: make package-blink1control-tool
- name: Upload blink1control-tool artifact
uses: actions/upload-artifact@v3
with:
name: blink1-tool-linux-all-artifacts
path: blink1*.zip
# retention-days: 5
# # do 'package-all' by hand so we can exclude blink1control on Mac/Win
# - name: package up
# shell: bash
# run: |
# make dist
# make package
# make package-tiny-server
# make package-blink1control-tool
# make cpbuilds
# - name: Upload a Build Artifact
# uses: actions/upload-artifact@v2.2.2
# with:
# name: blink1-tools
# path: |
# builds/*
# srcdist/*