-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
also add an action for the compiler installation
- Loading branch information
Showing
3 changed files
with
52 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: "Install various versions of gcc and clang" | ||
description: "dummy description" | ||
inputs: | ||
compiler: | ||
description: "Must be `gcc` or `clang`" | ||
required: true | ||
compiler-version: | ||
description: "the version of the compiler (must be major version)" | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Add PPA for GCC | ||
run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update | ||
shell: bash | ||
if : inputs.compiler == 'gcc' | ||
|
||
- name: Install gcc 11 | ||
run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-11 g++-11 | ||
if : inputs.compiler == 'gcc' && inputs.compiler-version == 11 | ||
shell: bash | ||
- name: Install gcc 12 | ||
run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-12 g++-12 | ||
if : inputs.compiler == 'gcc' && inputs.compiler-version == 12 | ||
shell: bash | ||
- name: Install gcc 13 | ||
run : sudo add-apt-repository ppa:ubuntu-toolchain-r/test && sudo apt update && sudo apt install -y gcc-13 g++-13 | ||
if : inputs.compiler == 'gcc' && inputs.compiler-version == 13 | ||
shell: bash | ||
- name: Install clang | ||
# The sed command fixes a bug in `llvm.sh` in combination with the latest version of | ||
# `apt-key`. Without it the GPG key for the llvm repository is downloaded but deleted | ||
# immediately after. | ||
run: | | ||
wget https://apt.llvm.org/llvm.sh | ||
sudo chmod +x llvm.sh | ||
sed 's/apt-key del/echo/' llvm.sh -iy | ||
sudo ./llvm.sh ${{inputs.compiler-version}} | ||
sudo apt install -y clang-${{inputs.compiler-version}} | ||
if : inputs.compiler == 'clang' | ||
shell: bash | ||
# TODO<joka921> Add assertion for unsupported compiler version. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters