diff --git a/.github/workflows/test-build.yaml b/.github/workflows/test-build.yaml new file mode 100644 index 0000000000..f170905207 --- /dev/null +++ b/.github/workflows/test-build.yaml @@ -0,0 +1,31 @@ +--- +name: build dnf5 with ccache to check for quick build errors +on: + pull_request: + workflow_dispatch: + +jobs: + build-with-ccache: + runs-on: ubuntu-latest + container: + image: fedora:rawhide + + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Prepare ccache timestamp + id: ccache_cache_timestamp + shell: cmake -P {0} + run: | + string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) + message("::set-output name=timestamp::${current_date}") + + - name: ccache cache files + uses: actions/cache@v1.1.0 + with: + path: .ccache + key: ${ { matrix.config.name } }-ccache-${ { steps.ccache_cache_timestamp.outputs.timestamp } } + restore-keys: | + ${ { matrix.config.name } }-ccache-