diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..64ab42b --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,33 @@ +name: Build and Test + +on: + push: + branches: + - '**' + pull_request: + branches: + - '**' + workflow_dispatch: + +jobs: + build-linux-run-tests: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - name: show Ubuntu version + run: cat /etc/os-release | grep PRETTY_NAME | awk -F '=' '{print $2}' + - name: update build environment + run: sudo apt-get update --fix-missing -y + - name: install prerequisites + run: | + sudo apt-get install -y autoconf autopoint libglib2.0-dev libdbus-1-dev libtool + - name: configure + env: + CC: /usr/bin/gcc + run: ./autogen.sh && ./configure + - name: make + run: make + - name: Run Tests + run: make check || cat test/error_log* diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..4f2093e --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,51 @@ +name: "CodeQL" + +on: + push: + branches: [master] + pull_request: + branches: [master] + schedule: + - cron: '0 7 * * 6' + workflow_dispatch: + +jobs: + analyze: + name: Analyze + runs-on: ubuntu-latest + permissions: + actions: read + contents: read + security-events: write + + strategy: + fail-fast: false + matrix: + language: ['c'] + + steps: + - name: Checkout repository + uses: actions/checkout@v6 + with: + submodules: recursive + + - name: Update build environment + run: sudo apt-get update --fix-missing -y + + - name: Install prerequisite + run: | + sudo apt-get install -y autoconf autopoint libglib2.0-dev libdbus-1-dev libtool + + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: ${{ matrix.language }} + queries: +security-and-quality + + - name: Autobuild + uses: github/codeql-action/autobuild@v4 + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + with: + category: "/language:${{ matrix.language }}"