From 6b3ba372436e0d481c9a636924911319853b69a2 Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sat, 5 Feb 2022 13:28:18 +1100 Subject: [PATCH] Use alpine image for clang-format --- .github/workflows/push.yml | 23 +++++++---------------- Dockerfile | 2 +- 2 files changed, 8 insertions(+), 17 deletions(-) diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 116f570a..b37f397d 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -103,28 +103,19 @@ jobs: check_formatting: runs-on: ubuntu-20.04 + container: + image: alpine:3.15 steps: + - name: deps + run: apk add --no-cache python3 py3-pip make git + - uses: actions/checkout@v2 with: submodules: true - - name: chmod - run: chmod +x setup.sh && chmod +x source/build.sh && sudo mkdir -p /build/cache && sudo chmod -R 777 /build - - - name: Cached compiler source files - uses: actions/cache@v2.1.7 - env: - cache-name: cache-compilers - with: - # we deliberately persist a cache folder forwards - path: /build/cache - key: ${{ runner.os }}-build-${{ env.cache-name }} - restore-keys: | - ${{ runner.os }}- - - - name: setup - run: sudo apt-get update && sudo apt-get install -y make clang git python3 python3-pip && python3 -m pip install bdflib black flake8 + - name: install black + run: python3 -m pip install bdflib black flake8 - name: Check formatting with clang-format run: cd source && make clean && make check-style diff --git a/Dockerfile b/Dockerfile index 9da5c841..4622f33b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,7 +9,7 @@ WORKDIR /build # musl-dev is required for the multi lang firmwares # clang is required for clang-format (for dev) -RUN apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git musl-dev clang bash +RUN apk add --no-cache gcc-riscv-none-elf gcc-arm-none-eabi newlib-riscv-none-elf newlib-arm-none-eabi findutils python3 py3-pip make git musl-dev clang bash clang-extra-tools # Install Python3 packages