Skip to content

Commit

Permalink
gh-actions: more ccache
Browse files Browse the repository at this point in the history
  • Loading branch information
mr-c committed Jan 31, 2025
1 parent 31c03ef commit 4929d54
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 69 deletions.
141 changes: 80 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,16 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: CPU Information
run: cat /proc/cpuinfo
- id: cpu
name: CPU Information
run: |
echo "model_name=$("grep -m1 'model name' < /proc/cpuinfo | awk '-F: ' '{ print $2}')" >> "$GITHUB_OUTPUT"
- run: sudo apt-get update
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.isax }}
key: ${{ github.job }}-${{ matrix.isax }}-${{ steps.cpu.outputs.model_name }}
evict-old-files: job
- name: Install APT Dependencies
run: |
sudo apt-get install -y --no-install-recommends ninja-build ninja-build pipx
Expand Down Expand Up @@ -152,14 +155,15 @@ jobs:
submodules: recursive
- name: CPU Information
run: cat /proc/cpuinfo
- run: sudo apt-get update
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-
evict-old-files: job
- name: Install APT Dependencies
run: |
#sudo add-apt-repository ppa:aschultz/backports
sudo apt-get update
sudo apt-get install -y --no-install-recommends ninja-build ninja-build pipx g++-12 gcc-12 qemu-user-static
# sudo apt-get purge -y gcc g++
# sudo ln -s /usr/bin/gcc-12 /usr/bin/gcc
Expand Down Expand Up @@ -189,11 +193,18 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: CPU Information
run: cat /proc/cpuinfo
- id: cpu
name: CPU Information
run: |
echo "model_name=$("grep -m1 'model name' < /proc/cpuinfo | awk '-F: ' '{ print $2}')" >> "$GITHUB_OUTPUT"
- run: sudo apt-get update
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ steps.cpu.outputs.model_name }}
evict-old-files: job
- name: Install APT Dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y --no-install-recommends ninja-build ninja-build pipx &&\
pipx install meson==0.55.1
- name: Install emscripten
Expand Down Expand Up @@ -227,11 +238,18 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: CPU Information
run: cat /proc/cpuinfo
- id: cpu
name: CPU Information
run: |
echo "model_name=$("grep -m1 'model name' < /proc/cpuinfo | awk '-F: ' '{ print $2}')" >> "$GITHUB_OUTPUT"
- run: sudo apt-get update
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ steps.cpu.outputs.model_name }}
evict-old-files: job
- name: Install APT Dependencies
run: |
sudo apt-get update && \
sudo apt-get -y --no-install-recommends install libxml2-utils ninja-build pipx && \
pipx install meson==0.55.1
- name: Convert
Expand All @@ -252,9 +270,16 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- id: cpu
name: CPU Information
run: |
echo "model_name=$("grep -m1 'model name' < /proc/cpuinfo | awk '-F: ' '{ print $2}')" >> "$GITHUB_OUTPUT"
- run: sudo apt-get update
- name: CPU Information
run: cat /proc/cpuinfo
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ steps.cpu.outputs.model_name }}
evict-old-files: job
- name: Install APT Dependencies
run: |
sudo apt-get install -y --no-install-recommends ninja-build ninja-build libsleef-dev pipx
Expand All @@ -279,15 +304,13 @@ jobs:
arch_flags: -march=native
- version: 10
distro: ubuntu-24.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: 11
distro: ubuntu-24.04
arch_flags: -march=native
- version: 11
distro: ubuntu-24.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: 11
distro: ubuntu-24.04-arm
arch_flags: -march=native
Expand All @@ -296,8 +319,7 @@ jobs:
arch_flags: -march=native
- version: 12
distro: ubuntu-24.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: 12
distro: ubuntu-24.04-arm
arch_flags: -march=native
Expand All @@ -306,8 +328,7 @@ jobs:
arch_flags: -march=native
- version: 13
distro: ubuntu-24.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: 13
distro: ubuntu-24.04-arm
arch_flags: -march=native
Expand All @@ -316,8 +337,7 @@ jobs:
arch_flags: -march=native
- version: 14
distro: ubuntu-24.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: 14
distro: ubuntu-24.04-arm
arch_flags: -march=native
Expand All @@ -329,8 +349,16 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: CPU Information
run: cat /proc/cpuinfo
- id: cpu
name: CPU Information
run: |
echo "model_name=$("grep -m1 'model name' < /proc/cpuinfo | awk '-F: ' '{ print $2}')" >> "$GITHUB_OUTPUT"
- run: sudo apt-get update
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.version }}-${{ matrix.distro }}-${{ matrix.arch_flags }}-${{ steps.cpu.outputs.model_name }}
evict-old-files: job
- name: Install APT Dependencies
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
Expand All @@ -339,11 +367,6 @@ jobs:
sudo apt-get -y install --no-install-recommends gcovr pipx ninja-build gcc-${{ matrix.version }} g++-${{ matrix.version }}
sudo apt-get -y purge g++ gcc
pipx install meson==0.55.1
- name: ccache
uses: hendrikmuhs/[email protected]
if: ${{ matrix.ccache == 'true' }}
with:
key: ${{ github.job }}-${{ matrix.version }}-${{ matrix.distro }}-${{ matrix.arch_flags }}
- name: add ccache to the build path
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
Expand Down Expand Up @@ -443,6 +466,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.version}}${{ matrix.extra }}-${{ matrix.distro }}-${{ matrix.cross }}
evict-old-files: job
- name: add ccache to the build path
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
Expand Down Expand Up @@ -494,6 +518,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.distro }}-${{ matrix.cross }}
evict-old-files: job
- name: add ccache to the build path
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
Expand Down Expand Up @@ -544,6 +569,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.distro }}-${{ matrix.cross }}
evict-old-files: job
- name: add ccache to the build path
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
Expand Down Expand Up @@ -630,6 +656,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.version }}${{ matrix.extra }}-${{ matrix.cross }}
evict-old-files: job
- name: add ccache to the build path
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
Expand Down Expand Up @@ -663,65 +690,56 @@ jobs:
arch_flags: -march=native
- version: "12"
distro: ubuntu-22.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: "13"
distro: ubuntu-22.04
arch_flags: -march=native
- version: "13"
distro: ubuntu-22.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: "14"
distro: ubuntu-24.04
arch_flags: -march=native
- version: "14"
distro: ubuntu-24.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: "14"
distro: ubuntu-24.04-arm
arch_flags: -march=armv8-a+fp+aes+sha2+sha3+sm4+sve+flagm+ssbs+sb+sve2+i8mm+bf16
# grep Features < /proc/cpuinfo | head -n 1 | awk '-F: ' '{print $2}' | sed 's/asimd //;s/evtstrm //;s/pmull //;s/sha1 //;s/crc32 //;s/atomics //;s/fphp //;s/asimd.. //g;s/cpuid //;s/asimd... //g;s/jscvt //;s/fcma //;s/lrcpc //;s/dcpop //;s/sm3 //;s/sha512 //;s/uscat //;s/ilrcpc //;s/pac. //g;s/dcpodp //;s/sveaes //;s/svebitperm //;s/svesha3 //;s/svesm4 //;s/flagm2 //;s/frint //;s/svei8mm //;s/svebf16 //' | tr ' ' '+'
- version: "14"
distro: ubuntu-24.04-arm
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: "15"
distro: ubuntu-24.04
arch_flags: -march=native
- version: "15"
distro: ubuntu-24.04
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: "15"
distro: ubuntu-24.04-arm
arch_flags: -march=native
- version: "15"
distro: ubuntu-24.04-arm
arch_flags: -ffast-math
ccache: 'true'
arch_flags: -ffast-math -march=native
- version: "16"
distro: ubuntu-24.04
arch_flags: -march=native -Wno-unsafe-buffer-usage
- version: "16"
distro: ubuntu-24.04
arch_flags: -ffast-math -Wno-unsafe-buffer-usage
ccache: 'true'
arch_flags: -ffast-math -march=native -Wno-unsafe-buffer-usage
- version: "16"
distro: ubuntu-24.04-arm
arch_flags: -march=native -Wno-unsafe-buffer-usage
- version: "16"
distro: ubuntu-24.04-arm
arch_flags: -ffast-math -Wno-unsafe-buffer-usage
ccache: 'true'
arch_flags: -ffast-math -march=native -Wno-unsafe-buffer-usage
- version: "17"
distro: ubuntu-24.04
arch_flags: -march=native -Wno-unsafe-buffer-usage
- version: "17"
distro: ubuntu-24.04
arch_flags: -ffast-math -Wno-unsafe-buffer-usage
ccache: 'true'
arch_flags: -ffast-math -march=native -Wno-unsafe-buffer-usage
- version: "17"
distro: ubuntu-24.04
arch_flags: -march=native -Wno-unsafe-buffer-usage -O2
Expand All @@ -730,8 +748,7 @@ jobs:
arch_flags: -march=native -Wno-unsafe-buffer-usage
- version: "17"
distro: ubuntu-24.04-arm
arch_flags: -ffast-math -Wno-unsafe-buffer-usage
ccache: 'true'
arch_flags: -ffast-math -march=native -Wno-unsafe-buffer-usage
- version: "17"
distro: ubuntu-24.04-arm
arch_flags: -march=native -Wno-unsafe-buffer-usage -O2
Expand All @@ -740,8 +757,7 @@ jobs:
arch_flags: -march=native -Wno-unsafe-buffer-usage -Wno-switch-default
- version: "18"
distro: ubuntu-24.04
arch_flags: -ffast-math -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-nan-infinity-disabled
ccache: 'true'
arch_flags: -ffast-math -march=native -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-nan-infinity-disabled
- version: "18"
distro: ubuntu-24.04
arch_flags: -march=native -Wno-unsafe-buffer-usage -Wno-switch-default -O2
Expand All @@ -750,8 +766,7 @@ jobs:
arch_flags: -march=native -Wno-unsafe-buffer-usage -Wno-switch-default
- version: "18"
distro: ubuntu-24.04-arm
arch_flags: -ffast-math -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-nan-infinity-disabled
ccache: 'true'
arch_flags: -ffast-math -march=native -Wno-unsafe-buffer-usage -Wno-switch-default -Wno-nan-infinity-disabled
- version: "18"
distro: ubuntu-24.04-arm
arch_flags: -march=native -Wno-unsafe-buffer-usage -Wno-switch-default -O2
Expand All @@ -763,8 +778,16 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: CPU Information
run: cat /proc/cpuinfo
- id: cpu
name: CPU Information
run: |
echo "model_name=$("grep -m1 'model name' < /proc/cpuinfo | awk '-F: ' '{ print $2}')" >> "$GITHUB_OUTPUT"
- run: sudo apt-get update
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.version }}-${{ matrix.distro }}-${{ matrix.arch_flags }}-${{ steps.cpu.outputs.model_name }}
evict-old-files: job
- name: Install PPAs
if: ${{ matrix.distro == 'ubuntu-22.04' }}
run: |
Expand All @@ -782,13 +805,7 @@ jobs:
sudo rm /usr/bin/gcc /usr/bin/g++ /usr/bin/cc /usr/bin/c++
sudo ln -s $(command -v clang-${{ matrix.version }}) /usr/bin/cc
sudo ln -s $(command -v clang-${{ matrix.version }}) /usr/bin/c++
- name: ccache
uses: hendrikmuhs/[email protected]
if: ${{ matrix.ccache == 'true' }}
with:
key: ${{ github.job }}-${{ matrix.version }}-${{ matrix.distro }}-${{ matrix.arch_flags }}
- name: add ccache to the build path
if: ${{ matrix.ccache == 'true' }}
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
- name: Configure
Expand Down Expand Up @@ -860,6 +877,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-${{ matrix.xcode }}
evict-old-files: job
- name: Python install bug workaround # https://github.com/actions/setup-python/issues/577
run: |
find /usr/local/bin -type l -exec sh -c 'readlink -f "$1" \
Expand Down Expand Up @@ -925,6 +943,7 @@ jobs:
uses: hendrikmuhs/[email protected]
with:
key: ${{ github.job }}-gcc-14
evict-old-files: job
- name: Configure
run: meson setup build --cross-file=docker/cross-files/loongarch64-gcc-14-ccache.cross || (cat build/meson-logs/meson-log.txt ; false)
- name: Build
Expand Down
4 changes: 2 additions & 2 deletions docker/cross-files/emscripten32-relaxed.cross
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[binaries]
c = '/opt/emsdk/upstream/emscripten/emcc'
cpp = '/opt/emsdk/upstream/emscripten/em++'
c = ['ccache', '/opt/emsdk/upstream/emscripten/emcc']
cpp = ['ccache', '/opt/emsdk/upstream/emscripten/em++']
ar = '/opt/emsdk/upstream/emscripten/emar'
strip = '/opt/emsdk/upstream/bin/llvm-strip'
objcopy = '/opt/emsdk/upstream/bin/llvm-objcopy'
Expand Down
4 changes: 2 additions & 2 deletions docker/cross-files/emscripten32.cross
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[binaries]
c = '/opt/emsdk/upstream/emscripten/emcc'
cpp = '/opt/emsdk/upstream/emscripten/em++'
c = ['ccache', '/opt/emsdk/upstream/emscripten/emcc']
cpp = ['ccache', '/opt/emsdk/upstream/emscripten/em++']
ar = '/opt/emsdk/upstream/emscripten/emar'
strip = '/opt/emsdk/upstream/bin/llvm-strip'
objcopy = '/opt/emsdk/upstream/bin/llvm-objcopy'
Expand Down
4 changes: 2 additions & 2 deletions docker/cross-files/emscripten64-relaxed.cross
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# V8 version 11.5.69

[binaries]
c = '/opt/emsdk/upstream/emscripten/emcc'
cpp = '/opt/emsdk/upstream/emscripten/em++'
c = ['ccache', '/opt/emsdk/upstream/emscripten/emcc']
cpp = ['ccache', '/opt/emsdk/upstream/emscripten/em++']
ar = '/opt/emsdk/upstream/emscripten/emar'
strip = '/opt/emsdk/upstream/bin/llvm-strip'
objcopy = '/opt/emsdk/upstream/bin/llvm-objcopy'
Expand Down
Loading

0 comments on commit 4929d54

Please sign in to comment.