diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000..0120248 --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,46 @@ +name: C/C++ CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-18.04 + + steps: + - uses: actions/checkout@v2 + - name: create dependecies + run: | + sudo apt-get update -qq + sudo apt-get install -y libmilter-dev libspf2-dev libspf2-2 opendkim-tools lcov + - name: make + run: make + - name: make coverage + run: make coverage + - name: make test + run: make test + - name: Set up Ruby 2.6 + uses: actions/setup-ruby@v1 + with: + ruby-version: 2.6.x + - name: Coverge + run: | + gem install coveralls-lcov + lcov --directory . --capture --output-file coverage.info + lcov --remove coverage.info 'tests/*' 'usr/*' --output-file coverage.info + lcov --list coverage.info + coveralls-lcov --repo-token ${{ secrets.COVERALLS_TOKEN }} coverage.info + + - name: Build & push Docker image + uses: mr-smithers-excellent/docker-build-push@v5 + with: + image: underspell/smf-spf + tags: latest + registry: docker.io + dockerfile: Dockerfile + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }}