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 }}
42 - name: Configuring ccache to use precompiled headers
43 if: ${{ inputs.use-ccache }}
45 ln -s /usr/bin/ccache /usr/local/bin/${{ inputs.cxx }}
46 /usr/bin/ccache --set-config=sloppiness=pch_defines,time_macros,include_file_mtime,include_file_ctime
47 /usr/bin/ccache --set-config=pch_external_checksum=true
50 - name: Install required packages
53 sudo apt-get install \
55 libcurl4-openssl-dev \
58 - name: Generate configure
62 run: ./configure ${{ inputs.configure-opts }}
64 CXX: ${{ inputs.cxx }}
65 CXXFLAGS: ${{ inputs.cxx-flags }}
67 - name: Build with distcheck
68 if: ${{ inputs.distcheck }}
69 run: make DISTCHECK_CONFIGURE_FLAGS="CXX=\"${{ inputs.cxx }}\" CXXFLAGS=\"${{ inputs.cxx-flags }}\" ${{ inputs.configure-opts }}" -j$(nproc) distcheck >/dev/null
72 if: ${{ !inputs.distcheck }}
73 run: make -j$(nproc) >/dev/null