From 04d5659f5fcc1648e77a8264e7f61d1fca4d2603 Mon Sep 17 00:00:00 2001 From: Rui Chen Date: Mon, 30 Jan 2023 23:53:27 -0500 Subject: [PATCH] ci: update action runners (#186) * ci: add macos-11.0 * ci: update runners * Restore ubuntu-18.04 back --------- Signed-off-by: Tao He Co-authored-by: Tao He --- .github/workflows/build-deb-package.yml | 6 +-- .github/workflows/build-test.yml | 63 ++++++++++++++++++++----- .github/workflows/centos-latest.yml | 17 +++++-- 3 files changed, 69 insertions(+), 17 deletions(-) diff --git a/.github/workflows/build-deb-package.yml b/.github/workflows/build-deb-package.yml index 8db7915..213c91f 100644 --- a/.github/workflows/build-deb-package.yml +++ b/.github/workflows/build-deb-package.yml @@ -13,7 +13,7 @@ jobs: matrix: os: [ubuntu-20.04] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true @@ -22,7 +22,7 @@ jobs: date +'%Y-%m' > snapshot.txt - name: Cache for cccahe - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /home/runner/.ccache key: ${{ runner.os }}-deb-ccache-${{ hashFiles('**/snapshot.txt') }} @@ -64,7 +64,7 @@ jobs: - name: Setup tmate session if: false - uses: mxschmitt/action-tmate@v2 + uses: mxschmitt/action-tmate@v3 - name: Prepare gpg environment run: | diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index e64b42d..f0ecdd6 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -11,12 +11,53 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - # disabled: macos-11.0 - # why: https://github.com/actions/virtual-environments/issues/2486 - os: [ubuntu-18.04, ubuntu-20.04, macos-10.15] - etcd: [v3.2.26, v3.3.11, v3.4.13] + os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, macos-10.15, macos-11, macos-12] + etcd: [v3.2.26, v3.3.11, v3.4.13, v3.5.7] + exclude: + - os: ubuntu-18.04 + etcd: v3.3.11 + - os: ubuntu-18.04 + etcd: v3.4.13 + - os: ubuntu-18.04 + etcd: v3.5.7 + + - os: ubuntu-20.04 + etcd: v3.2.26 + - os: ubuntu-20.04 + etcd: v3.4.13 + - os: ubuntu-20.04 + etcd: v3.5.7 + + - os: ubuntu-22.04 + etcd: v3.2.26 + - os: ubuntu-22.04 + etcd: v3.3.11 + - os: ubuntu-22.04 + etcd: v3.5.7 + + - os: macos-10.15 + etcd: v3.2.26 + - os: macos-10.15 + etcd: v3.3.11 + - os: macos-10.15 + etcd: v3.4.13 + + - os: macos-11 + etcd: v3.2.26 + - os: macos-11 + etcd: v3.3.11 + - os: macos-11 + etcd: v3.4.13 + + - os: macos-12 + etcd: v3.2.26 + - os: macos-12 + etcd: v3.3.11 + - os: macos-12 + etcd: v3.4.13 + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true @@ -25,7 +66,7 @@ jobs: date +'%Y-%m' > snapshot.txt - name: Cache for cccahe - uses: actions/cache@v2 + uses: actions/cache@v3 with: path: /home/runner/.ccache key: ${{ runner.os }}-ccache-${{ hashFiles('**/snapshot.txt') }} @@ -78,8 +119,8 @@ jobs: make -j`nproc` sudo make install - - name: Install grpc for Ubuntu 20.04 - if: matrix.os == 'ubuntu-20.04' + - name: Install grpc for Ubuntu 20.04 or later + if: ${{ runner.os != 'macOS' && matrix.os != 'ubuntu-18.04' }} run: | sudo apt install -y libcurl4-openssl-dev \ libprotobuf-dev \ @@ -148,7 +189,7 @@ jobs: - name: Setup tmate session if: false - uses: mxschmitt/action-tmate@v2 + uses: mxschmitt/action-tmate@v3 - name: Test run: | @@ -255,7 +296,7 @@ jobs: printf 'root\nroot\n' | /usr/local/bin/etcdctl user add root || true fi # for etcd v3.4 - if [[ "${{ matrix.etcd }}" == v3.4* ]]; + if [[ "${{ matrix.etcd }}" == v3.4* ]] || [[ "${{ matrix.etcd }}" == v3.5* ]]; then /usr/local/bin/etcdctl user add root --new-user-password="root" || true fi @@ -270,7 +311,7 @@ jobs: /usr/local/bin/etcdctl --user="root:root" auth disable || true fi # for etcd v3.4 - if [[ "${{ matrix.etcd }}" == v3.4* ]]; + if [[ "${{ matrix.etcd }}" == v3.4* ]] || [[ "${{ matrix.etcd }}" == v3.5* ]]; then /usr/local/bin/etcdctl auth disable --user="root" --password="root" || true fi diff --git a/.github/workflows/centos-latest.yml b/.github/workflows/centos-latest.yml index b0cfc8f..ee11998 100644 --- a/.github/workflows/centos-latest.yml +++ b/.github/workflows/centos-latest.yml @@ -39,12 +39,23 @@ jobs: chmod +x screenfetch-dev mv ./screenfetch-dev /usr/bin/screenfetch - # the checkout action require new version of git - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: submodules: true + - name: Get time + run: | + date +'%Y-%m' > snapshot.txt + + - name: Cache for cccahe + uses: actions/cache@v3 + with: + path: /home/runner/.ccache + key: ${{ runner.os }}-centos-ccache-${{ hashFiles('**/snapshot.txt') }} + restore-keys: | + ${{ runner.os }}-centos-ccache- + - name: Install grpc v1.27.x for CentOS latest run: | # We simply keep the same version with Ubuntu 18.04 @@ -113,7 +124,7 @@ jobs: - name: Setup tmate session if: false - uses: mxschmitt/action-tmate@v2 + uses: mxschmitt/action-tmate@v3 - name: Test run: |