RASCSI/.github/workflows/build_code.yml
akuker 34242a29ba
Added workflow configurations and README updates (#832)
* automated test try 1

* filter branches

* filter branches

* filter branches

* filter branches

* filter branches

* Configured build and test CI workflows

* enable for all branches

* Update README.md

* Update README.md

Co-authored-by: Tony Kuker <akuker@gmail.com>
2022-09-06 08:17:33 +02:00

55 lines
1.9 KiB
YAML

name: Build C++ Packages
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Add armhf as architecture
run: sudo dpkg --add-architecture armhf
- name: Reconfigure apt for arch amd64
run: sudo sed -i "s/deb /deb [arch=amd64] /g" /etc/apt/sources.list
- name: Add armhf repos (jammy)
run: sudo bash -c "echo \"deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy main multiverse restricted universe\" >> /etc/apt/sources.list"
- name: Add armhf repos (jammy-updates)
run: sudo bash -c "echo \"deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ jammy-updates main multiverse restricted universe\" >> /etc/apt/sources.list"
- name: Update apt
run: sudo apt update
- name: Install cross compile toolchain
run: sudo apt-get --yes install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf binutils-arm-linux-gnueabihf libspdlog-dev
- name: Install libraries
run: sudo apt-get --yes install libspdlog-dev:armhf libpcap-dev:armhf libevdev2:armhf libev-dev:armhf protobuf-compiler libprotobuf-dev:armhf
- name: make standard
run: make all -j6 CONNECT_TYPE=STANDARD CROSS_COMPILE=arm-linux-gnueabihf-
working-directory: ./src/raspberrypi
- name: make fullspec
run: make all -j6 CONNECT_TYPE=FULLSPEC CROSS_COMPILE=arm-linux-gnueabihf-
working-directory: ./src/raspberrypi
# We need to tar the binary outputs to retain the executable
# file permission. Currently, actions/upload-artifact only
# supports .ZIP files.
# This is workaround for https://github.com/actions/upload-artifact/issues/38
- name: tar binary outputs
run: tar -czvf rascsi.tar.gz ./bin
working-directory: ./src/raspberrypi
- name: upload artifacts
uses: actions/upload-artifact@v2
with:
name: arm-binaries
path: ./src/raspberrypi/rascsi.tar.gz