Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create build workflow #17

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
55 changes: 55 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: C/C++ CI

on:
workflow_dispatch:
push:
tags:
- "v*.*.*"

jobs:
build_arm:
# strategy:
# matrix:
# toolchain:
# - arm64
# - linux-x86
# - linux-armv6-lts
# - linux-armv7-lts
# - linux-arm64-lts

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pguyot/arm-runner-action@v2
id: build_arm
with:
base_image: raspios_lite_arm64:latest
copy_artifact_path: build/GCFFlasher
commands: |
apt-get -y install pkg-config build-essential libgpiod-dev cmake make
cmake -B build .
cmake -DCMAKE_BUILD_TYPE=Release --build build

- name: Rename binary to reflect archtiecture
run: mv GCFFlasher GCFFlasher-arm64

- uses: actions/upload-artifact@v4
with:
name: files
path: GCFFlasher-arm64

release:
runs-on: ubuntu-latest
needs: [build_arm]
permissions:
contents: write
steps:
- uses: actions/download-artifact@v4
with:
name: files
- uses: softprops/action-gh-release@v1
with:
draft: false
name: ${{ github.sha1 }}
generate_release_notes: true
files: GCFFlasher-*