name: 'Generate memory estimates' description: 'Generate library size tables for doxygen.' inputs: path: description: 'Path to library directory.' required: false default: ./ config: description: 'JSON config file containing library information to be used for memory estimation.' required: true output: description: 'File to write generated table to.' required: false default: 'size_table.html' check_against: description: > Path to existing memory estimates file to compare with the memory estimates calculated by the action. Action will fail if sizes do not match to indicate need for updating size. required: false default: '' toolchain_link: description: 'Link to ARM GCC tar.bz2 to use for compiling files (default version 9-2020-q2).' required: false default: "https://armkeil.blob.core.windows.net/developer/Files/downloads/gnu-rm/9-2020q2/gcc-arm-none-eabi-9-2020-q2-update-x86_64-linux.tar.bz2?revision=05382cca-1721-44e1-ae19-1e7c3dc96118&la=en&hash=D7C9D18FCA2DD9F894FD9F3C3DC9228498FA281A" runs: using: "composite" steps: - name: Install ARM GCC run: | wget -qO- "${{ inputs.toolchain_link }}" | sudo tar --strip-components=1 -xj -C /usr/local shell: bash - name: Compute sizes working-directory: ${{ inputs.path }} run: >- ${{ github.action_path }}/memory_statistics.py --config "${{ inputs.config }}" --output "${{ inputs.output }}" shell: bash - name: Compare table working-directory: ${{ inputs.path }} run: | if [ -n "${{ inputs.check_against }}" ] ; then if cmp "${{ inputs.check_against }}" "${{ inputs.output }}" ; then exit 0 else echo "Size table does not match!" diff -U 2 "${{ inputs.check_against }}" "${{ inputs.output }}" exit 1 fi fi shell: bash