From 7a08e90128d818ca3a514a4669796d79f39144ee Mon Sep 17 00:00:00 2001 From: Peter Toth Date: Fri, 29 Nov 2024 18:40:16 +0700 Subject: [PATCH] Cache --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++++--------- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2c35d1..412ab10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -86,21 +86,35 @@ jobs: test-minimum-supported-versions: name: Minimum Supported Versions Test - runs-on: ubuntu-20.04 + strategy: + matrix: + os: [ubuntu-20.04] + + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 + - name: Cache Bash dependencies + uses: actions/cache@v3 + with: + path: /tmp/bash-4.3 + key: bash-${{ runner.os }}-4.3 + restore-keys: | + bash-${{ runner.os }}- + - name: Install Bash 4.3 run: | - sudo apt-get update - sudo apt-get install -y build-essential wget # Install necessary build tools - wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz - tar -xvzf bash-4.3.tar.gz - cd bash-4.3 - ./configure - make - sudo make install + if [ ! -d "/tmp/bash-4.3" ]; then + sudo apt-get update + sudo apt-get install -y build-essential wget # Install necessary build tools + wget http://ftp.gnu.org/gnu/bash/bash-4.3.tar.gz + tar -xvzf bash-4.3.tar.gz + cd bash-4.3 + ./configure + make + sudo make install + fi echo "============================================" bash --version # Verify the installed Bash version @@ -122,4 +136,6 @@ jobs: - name: Run the tests run: | + bash --version + zsh --version script make test