release/v2.0.0 #10
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: Pipeline | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| clang-format: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install clang-format | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y clang-format | |
| - name: Check formatting | |
| run: | | |
| find src examples -name '*.c' -o -name '*.h' | xargs clang-format --dry-run --Werror | |
| scons-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y scons gcc libglib2.0-dev pkg-config swig default-jdk libgtest-dev python3-setuptools | |
| - name: Run tests | |
| run: scons test | |
| - name: Run binding tests | |
| run: scons bindings=all test | |
| build-deb: | |
| runs-on: ubuntu-latest | |
| needs: [clang-format, scons-test] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential debhelper devscripts scons libglib2.0-dev pkg-config | |
| - name: Build .deb package | |
| run: dpkg-buildpackage -us -uc -b | |
| - name: Find and rename generated .deb | |
| id: deb | |
| run: | | |
| DEB_FILE=$(ls ../libmicrohammer_*.deb) | |
| VERSION=$(cat VERSION) | |
| NEW_NAME="libmicrohammer_${VERSION}_amd64.deb" | |
| mv $DEB_FILE $NEW_NAME | |
| echo "deb_file=$NEW_NAME" >> $GITHUB_OUTPUT | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: libmicrohammer-deb | |
| path: ${{ steps.deb.outputs.deb_file }} |