1 name: Build with Autotools
26 - uses: actions/checkout@v3
30 - id: calculate-cache-key
31 name: Calculate cache key for ccache
33 key=$(echo "${{ inputs.cxx }} ${{ inputs.cxx-flags }} ${{ inputs.configure-opts }}" | sha256sum | cut -d' ' -f1)
34 echo "key=$key" >> $GITHUB_OUTPUT
36 - if: ${{ inputs.use-ccache }}
37 uses: hendrikmuhs/ccache-action@v1.2
39 key: ${{ steps.calculate-cache-key.outputs.key }}
41 - name: Configuring ccache to use precompiled headers
42 if: ${{ inputs.use-ccache }}
44 ln -s /usr/bin/ccache /usr/local/bin/${{ inputs.cxx }}
45 /usr/bin/ccache --set-config=sloppiness=pch_defines,time_macros,include_file_mtime,include_file_ctime
46 /usr/bin/ccache --set-config=pch_external_checksum=true
49 - name: Install required packages
52 sudo apt-get install \
54 libcurl4-openssl-dev \
57 - name: Generate configure
61 run: ./configure ${{ inputs.configure-opts }}
63 CXX: ${{ inputs.cxx }}
64 CXXFLAGS: ${{ inputs.cxx-flags }}
66 - name: Build with distcheck
67 if: ${{ inputs.distcheck }}
68 run: make DISTCHECK_CONFIGURE_FLAGS="CXX=\"${{ inputs.cxx }}\" CXXFLAGS=\"${{ inputs.cxx-flags }}\" ${{ inputs.configure-opts }}" -j$(nproc) distcheck >/dev/null
71 if: ${{ !inputs.distcheck }}
72 run: make -j$(nproc) >/dev/null