Refactor to provide siminfo to help decide if and how a device can be… #53
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: Make Packages | |
| on: | |
| push: | |
| tags: [ "*" ] | |
| jobs: | |
| build-monocoque-debs: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, debian-latest, debian-stable] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v1 | |
| - name: Checkout submodules | |
| run: git submodule update --init --recursive | |
| - name: Update apt | |
| run: sudo apt update | |
| - name: Install Dependencies | |
| run: sudo apt install -y libuv1-dev libargtable2-dev libserialport-dev libconfig-dev libhidapi-dev liblua5.4-dev libxdg-basedir-dev libxml2-dev libpulse-dev | |
| - name: Set build dir | |
| id: strings | |
| shell: bash | |
| run: | | |
| echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | |
| github_sha_hash=${{ github.sha }} | |
| echo "github-sha-short=${github_sha_hash:0:7}" >> $GITHUB_OUTPUT | |
| - name: Configure CMake | |
| run: > | |
| cmake -B ${{ steps.strings.outputs.build-output-dir }} | |
| -DCMAKE_CXX_COMPILER=g++ | |
| -DCMAKE_C_COMPILER=gcc | |
| -DCMAKE_BUILD_TYPE=Release | |
| -S ${{ github.workspace }} | |
| - name: Build | |
| run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config Release | |
| - name: Copy script files around to stop .github from being added to the package then build the package | |
| run: | | |
| mkdir PKG_SOURCE | |
| mkdir -p PKG_SOURCE/DEBIAN | |
| mkdir -p PKG_SOURCE/usr/bin/ | |
| cp ./tools/distro/debian/dpkg/${{ matrix.os }}/control ./PKG_SOURCE/DEBIAN/control | |
| cp ./build/monocoque ./PKG_SOURCE/usr/bin/monocoque | |
| dpkg-deb --build PKG_SOURCE monocoque-${{ matrix.os }}.deb | |
| - name: Release the Package | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: monocoque-${{ matrix.os }}.deb | |
| build-monocoque-rpms: | |
| strategy: | |
| matrix: | |
| os: [fedora-43] | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: create rpmbuild dirs | |
| run: mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS} | |
| - name: get spec file | |
| run: curl -o ~/fedora.spec https://raw.githubusercontent.com/Spacefreak18/monocoque/refs/heads/master/tools/distro/fedora/rpm/fedora.spec | |
| - name: run spec file | |
| run: rpmbuild -ba ~/fedora.spec | |
| - name: rename file | |
| run: cp ~/rpmbuild/RPMS/x86_64/monocoque-0.0.5-1.x86_64.rpm $GITHUB_WORKSPACE/monocoque-${{ matrix.os }}.rpm | |
| - name: Release the Package | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| files: monocoque-${{ matrix.os }}.rpm | |