diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 073cca7..a581891 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,14 +10,29 @@ jobs: with: fetch-depth: 0 - - name: "Install dependencies" + - name: "Add gcc-15 PPA" run: | - sudo add-apt-repository ppa:puni070/gcc-noble -y - sudo apt -y update - sudo apt -y install gcc-15 libgtk-3-dev libx11-dev libjansson-dev libluajit-5.1-dev - sudo pip3 install meson - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 150 - sudo update-alternatives --set gcc /usr/bin/gcc-15 + sudo add-apt-repository ppa:puni070/gcc-noble -y + sudo apt update + + - name: "Install and cache C dependencies" + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: > + gcc-15 + libgtk-3-dev + libx11-dev + libjansson-dev + libluajit-5.1-dev + version: 1.0 + + - name: "Install Meson" + run: sudo pip3 install meson + + - name: "Set up compiler" + run: | + sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-15 150 + sudo update-alternatives --set gcc /usr/bin/gcc-15 - name: "Configure" run: meson setup build -Dbuildtype=release -Dprefix=/usr