fix CI to force gcc 13
This commit is contained in:
parent
ac334fdfaa
commit
c6b8855930
1 changed files with 10 additions and 4 deletions
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
|
@ -1,4 +1,4 @@
|
||||||
name: TerminalImageViewer CI
|
name: Build and run
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -8,14 +8,20 @@ on:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: sudo apt-get install -qy imagemagick
|
run: sudo apt-get install -qy imagemagick
|
||||||
|
- name: Validate gcc version
|
||||||
|
run: |
|
||||||
|
if [[ $(gcc --version | awk '/gcc/ && ($3+0)>13{print "gcc-13+"}') != "gcc-13+" ]]; then
|
||||||
|
# Script courtesy of https://stackoverflow.com/a/67791068/16134571
|
||||||
|
sudo apt install gcc-13 g++-13
|
||||||
|
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13 --slave /usr/bin/gcov gcov /usr/bin/gcov-13
|
||||||
|
sudo update-alternatives --set gcc /usr/bin/gcc-13
|
||||||
|
fi
|
||||||
- name: Build
|
- name: Build
|
||||||
run: make -C src
|
run: make -C src
|
||||||
- name: Test
|
- name: Test
|
||||||
|
|
Loading…
Reference in a new issue