automated: build action #171
Workflow file for this run
This file contains hidden or 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
| name: Push commit | |
| on: | |
| push: | |
| # paths: | |
| # - 'src/**' | |
| # - 'scripts/**' | |
| # - 'Makefile' | |
| paths-ignore: | |
| - '*.tar.gz' | |
| # tags-ignore: | |
| # - '**' | |
| jobs: | |
| report: | |
| runs-on: ubuntu-22.04-arm | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| token: ${{ secrets.HIVE_CI }} | |
| - name: Install Deps | |
| run: | | |
| # update repos, install updates | |
| # sudo apt update -y | |
| # sudo apt upgrade -y | |
| # make sure required software is installed | |
| # sudo apt install software-properties-common wget xz-utils gcc build-essential clang make cmake -y | |
| # sudo apt install gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu g++-aarch64-linux-gnu -y | |
| # sudo apt install python3 python3-pip -y | |
| sudo apt install cmake -y | |
| sudo apt install gpiod libgpiod-dev -y | |
| sudo apt install fakeroot gettext-base -y | |
| - name: Clean Files | |
| run: | | |
| if [ -f target.tar.gz ]; then git rm target.tar.gz; fi | |
| - name: Install FlatBuffers | |
| run: | | |
| # manually install flatbuffers header files bc its not packaged properly | |
| if [ -d flatbuffers ]; then rm -rf flatbuffers; fi | |
| curl -sSfL https://github.com/google/flatbuffers/archive/refs/tags/v25.2.10.tar.gz -o flatbuffers.tar.gz | |
| tar -xzf flatbuffers.tar.gz | |
| ls -al flatbuffers-25.2.10 | |
| mv flatbuffers-25.2.10 ~/flatbuffers | |
| # symlink include directory | |
| if [ ! -L /usr/include/flatbuffers/ ]; then sudo ln -s ~/flatbuffers/include/flatbuffers/ /usr/include/flatbuffers; fi | |
| rm -f flatbuffers.tar.gz | |
| rm -rf flatbuffers | |
| - name: Install WiringPI | |
| run: | | |
| curl -sSfL https://github.com/WiringPi/WiringPi/releases/download/3.14/wiringpi_3.14_arm64.deb -o wiringpi.deb | |
| sudo apt install ./wiringpi.deb | |
| rm -f wiringpi.deb | |
| - name: Build Files | |
| run: | | |
| # git config --global user.name 'action' | |
| # git config --global user.email 'action@github.com' | |
| git submodule update --init --recursive --remote --force | |
| make build | |
| tar -czvf target.tar.gz target/ | |
| - name: Commit report | |
| run: | | |
| git config --global user.name 'RPI WiFi Controller Auto-Build' | |
| git config --global user.email 'action@github.com' | |
| git add target.tar.gz || exit 0 | |
| git commit -am "automated: build action" || exit 0 | |
| git fetch origin | |
| git rebase origin/main | |
| git push origin HEAD:main --force | |
| # - name: Release | |
| # uses: ncipollo/release-action@v1 | |
| # with: | |
| # artifacts: "target.tar.gz" | |
| # bodyFile: "CHANGELOG.md" | |
| # prerelease: true |