install #13
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
# .github/workflows/build.yml | |
name: Build and Package | |
on: [push, pull_request] | |
jobs: | |
build-and-package: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [amd64, aarch64] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup QEMU | |
uses: docker/[email protected] | |
with: | |
platforms: ${{ matrix.arch }} | |
- name: Setup Docker Buildx | |
uses: docker/[email protected] | |
with: | |
platforms: ${{ matrix.arch }} | |
- name: Setup GCC | |
uses: johelegp/gcc-snapshot@v1 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential \ | |
cmake \ | |
libpaho-mqtt-dev \ | |
libpaho-mqttpp-dev \ | |
libboost-all-dev \ | |
libjsoncpp-dev \ | |
dpkg-dev \ | |
ubuntu-dev-tools | |
- name: Setup CMake | |
uses: jwlawson/[email protected] | |
- name: Configure and Build | |
run: | | |
mkdir build | |
cd build | |
cmake .. | |
cmake --build . --config Release | |
- name: Package DEB | |
run: | | |
cd build | |
cpack -G DEB | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v2 | |
with: | |
name: homed-exporter-${{ matrix.arch }} | |
path: build/*.deb |