ci: update action runners (#186)

* ci: add macos-11.0
* ci: update runners
* Restore ubuntu-18.04 back

---------

Signed-off-by: Tao He <sighingnow@gmail.com>
Co-authored-by: Tao He <sighingnow@gmail.com>
This commit is contained in:
Rui Chen 2023-01-30 23:53:27 -05:00 committed by GitHub
parent fb41073a90
commit 04d5659f5f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 69 additions and 17 deletions

View File

@ -13,7 +13,7 @@ jobs:
matrix: matrix:
os: [ubuntu-20.04] os: [ubuntu-20.04]
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@ -22,7 +22,7 @@ jobs:
date +'%Y-%m' > snapshot.txt date +'%Y-%m' > snapshot.txt
- name: Cache for cccahe - name: Cache for cccahe
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: /home/runner/.ccache path: /home/runner/.ccache
key: ${{ runner.os }}-deb-ccache-${{ hashFiles('**/snapshot.txt') }} key: ${{ runner.os }}-deb-ccache-${{ hashFiles('**/snapshot.txt') }}
@ -64,7 +64,7 @@ jobs:
- name: Setup tmate session - name: Setup tmate session
if: false if: false
uses: mxschmitt/action-tmate@v2 uses: mxschmitt/action-tmate@v3
- name: Prepare gpg environment - name: Prepare gpg environment
run: | run: |

View File

@ -11,12 +11,53 @@ jobs:
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
strategy: strategy:
matrix: matrix:
# disabled: macos-11.0 os: [ubuntu-18.04, ubuntu-20.04, ubuntu-22.04, macos-10.15, macos-11, macos-12]
# why: https://github.com/actions/virtual-environments/issues/2486 etcd: [v3.2.26, v3.3.11, v3.4.13, v3.5.7]
os: [ubuntu-18.04, ubuntu-20.04, macos-10.15] exclude:
etcd: [v3.2.26, v3.3.11, v3.4.13] - 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: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true submodules: true
@ -25,7 +66,7 @@ jobs:
date +'%Y-%m' > snapshot.txt date +'%Y-%m' > snapshot.txt
- name: Cache for cccahe - name: Cache for cccahe
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: /home/runner/.ccache path: /home/runner/.ccache
key: ${{ runner.os }}-ccache-${{ hashFiles('**/snapshot.txt') }} key: ${{ runner.os }}-ccache-${{ hashFiles('**/snapshot.txt') }}
@ -78,8 +119,8 @@ jobs:
make -j`nproc` make -j`nproc`
sudo make install sudo make install
- name: Install grpc for Ubuntu 20.04 - name: Install grpc for Ubuntu 20.04 or later
if: matrix.os == 'ubuntu-20.04' if: ${{ runner.os != 'macOS' && matrix.os != 'ubuntu-18.04' }}
run: | run: |
sudo apt install -y libcurl4-openssl-dev \ sudo apt install -y libcurl4-openssl-dev \
libprotobuf-dev \ libprotobuf-dev \
@ -148,7 +189,7 @@ jobs:
- name: Setup tmate session - name: Setup tmate session
if: false if: false
uses: mxschmitt/action-tmate@v2 uses: mxschmitt/action-tmate@v3
- name: Test - name: Test
run: | run: |
@ -255,7 +296,7 @@ jobs:
printf 'root\nroot\n' | /usr/local/bin/etcdctl user add root || true printf 'root\nroot\n' | /usr/local/bin/etcdctl user add root || true
fi fi
# for etcd v3.4 # for etcd v3.4
if [[ "${{ matrix.etcd }}" == v3.4* ]]; if [[ "${{ matrix.etcd }}" == v3.4* ]] || [[ "${{ matrix.etcd }}" == v3.5* ]];
then then
/usr/local/bin/etcdctl user add root --new-user-password="root" || true /usr/local/bin/etcdctl user add root --new-user-password="root" || true
fi fi
@ -270,7 +311,7 @@ jobs:
/usr/local/bin/etcdctl --user="root:root" auth disable || true /usr/local/bin/etcdctl --user="root:root" auth disable || true
fi fi
# for etcd v3.4 # for etcd v3.4
if [[ "${{ matrix.etcd }}" == v3.4* ]]; if [[ "${{ matrix.etcd }}" == v3.4* ]] || [[ "${{ matrix.etcd }}" == v3.5* ]];
then then
/usr/local/bin/etcdctl auth disable --user="root" --password="root" || true /usr/local/bin/etcdctl auth disable --user="root" --password="root" || true
fi fi

View File

@ -39,12 +39,23 @@ jobs:
chmod +x screenfetch-dev chmod +x screenfetch-dev
mv ./screenfetch-dev /usr/bin/screenfetch mv ./screenfetch-dev /usr/bin/screenfetch
# the checkout action require new version of git # the checkout action require new version of git
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
submodules: true 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 - name: Install grpc v1.27.x for CentOS latest
run: | run: |
# We simply keep the same version with Ubuntu 18.04 # We simply keep the same version with Ubuntu 18.04
@ -113,7 +124,7 @@ jobs:
- name: Setup tmate session - name: Setup tmate session
if: false if: false
uses: mxschmitt/action-tmate@v2 uses: mxschmitt/action-tmate@v3
- name: Test - name: Test
run: | run: |