Skip to content

Commit 406283b

Browse files
committed
[workflows] Update GitHub actions to use modern tools
Build classic-flang-llvm-project and flang with GCC 12 and Clang 14/15 on Ubuntu 22.04.
1 parent 417a9b1 commit 406283b

File tree

3 files changed

+23
-34
lines changed

3 files changed

+23
-34
lines changed

.github/workflows/flang-arm64-tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,20 @@ jobs:
1212
build_path: /home/github
1313
install_prefix: /home/github/usr/local
1414
container:
15-
image: ghcr.io/${{ github.repository_owner}}/ubuntu20-flang-${{ github.base_ref }}:latest
15+
image: ghcr.io/${{ github.repository_owner}}/ubuntu-flang-${{ github.base_ref }}:latest
1616
credentials:
1717
username: github
1818
strategy:
1919
matrix:
2020
target: [AArch64]
2121
cc: [clang]
2222
cpp: [clang++]
23-
version: [10, 11]
23+
version: [14, 15]
2424
include:
2525
- target: AArch64
2626
cc: gcc
2727
cpp: g++
28-
version: 10
28+
version: 12
2929

3030
steps:
3131
- name: Check tools

.github/workflows/flang-tests.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ on:
77

88
jobs:
99
build:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-22.04
1111
env:
1212
install_prefix: /usr/local
1313
strategy:
1414
matrix:
1515
target: [X86]
1616
cc: [clang]
1717
cpp: [clang++]
18-
version: [10, 11]
18+
version: [14, 15]
1919
include:
2020
- target: X86
2121
cc: gcc
2222
cpp: g++
23-
version: 10
23+
version: 12
2424

2525
steps:
2626
- uses: actions/checkout@v2
@@ -29,20 +29,15 @@ jobs:
2929
run: |
3030
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
3131
sudo touch /etc/apt/sources.list.d/llvm.list
32-
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' | sudo tee -a /etc/apt/sources.list.d/llvm.list
33-
echo 'deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' | sudo tee -a /etc/apt/sources.list.d/llvm.list
34-
wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
3532
sudo apt update
3633
sudo apt install -f -y llvm-${{ matrix.version }} clang-${{ matrix.version}}
3734
38-
- if: matrix.cc == 'gcc' && matrix.version == '10'
35+
- if: matrix.cc == 'gcc'
3936
run: |
4037
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
41-
sudo apt install gcc-10 g++-10
42-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 10
43-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 20
44-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 10
45-
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 20
38+
sudo apt install gcc-${{ matrix.version }} g++-${{ matrix.version }}
39+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.version }} 20
40+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.version }} 20
4641
4742
- name: ccache
4843
uses: hendrikmuhs/ccache-action@v1

.github/workflows/pre-compile_llvm.yml

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,34 @@ jobs:
1313
strategy:
1414
matrix:
1515
target: [X86]
16-
cc: [clang, gcc]
17-
version: [10, 11]
16+
cc: [clang]
17+
cpp: [clang++]
18+
version: [14, 15]
19+
include:
20+
- target: X86
21+
cc: gcc
22+
cpp: g++
23+
version: 12
1824

1925
steps:
2026
- if: matrix.cc == 'clang'
2127
run: |
22-
echo "cpp=clang++" >> $GITHUB_ENV
2328
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
24-
sudo touch /etc/apt/sources.list.d/llvm.list
25-
echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' | sudo tee -a /etc/apt/sources.list.d/llvm.list
26-
echo 'deb-src http://apt.llvm.org/focal/ llvm-toolchain-focal-11 main' | sudo tee -a /etc/apt/sources.list.d/llvm.list
27-
wget -q -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
2829
sudo apt update
29-
sudo apt install -f -y llvm-${{ matrix.version }} clang-${{ matrix.version}}
30-
31-
- if: matrix.cc == 'gcc' && matrix.version == '10'
32-
run: |
33-
echo "cpp=g++" >> $GITHUB_ENV
34-
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
35-
sudo apt install gcc-10 g++-10
30+
sudo apt install -f -y llvm-${{ matrix.version }} clang-${{ matrix.version }}
3631
37-
- if: matrix.cc == 'gcc' && matrix.version == '11'
32+
- if: matrix.cc == 'gcc'
3833
run: |
39-
echo "cpp=g++" >> $GITHUB_ENV
4034
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
41-
sudo apt install gcc-11 g++-11
35+
sudo apt install gcc-${{ matrix.version }} g++-${{ matrix.vresion }}
4236
4337
- name: Check tools
4438
run: |
4539
git --version
4640
cmake --version
4741
make --version
4842
${{ matrix.cc }}-${{ matrix.version }} --version
49-
${{env.cpp}}-${{ matrix.version }} --version
43+
${{ matrix.cpp }}-${{ matrix.version }} --version
5044
5145
- name: Extract branch name
5246
run: echo "::set-output name=branch::${GITHUB_REF#refs/heads/}"
@@ -66,7 +60,7 @@ jobs:
6660
-t ${{ matrix.target }} \
6761
-p /usr/local \
6862
-a /usr/bin/${{ matrix.cc }}-${{ matrix.version }} \
69-
-b /usr/bin/${{env.cpp}}-${{ matrix.version }} \
63+
-b /usr/bin/${{ matrix.cpp }}-${{ matrix.version }} \
7064
-n $(nproc) \
7165
-x "-DLLVM_ENABLE_ASSERTIONS=ON" \
7266
-v

0 commit comments

Comments
 (0)