Skip to content

Commit

Permalink
📝 Migrate Gettings Started to llvm
Browse files Browse the repository at this point in the history
  • Loading branch information
kammce committed Apr 2, 2024
1 parent 5537b56 commit bc359ca
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ on:
permissions:
contents: write
env:
CURRENT_VERSION: "3.0"
CURRENT_VERSION: "3.1"
PRODUCTION: true

jobs:
Expand Down
49 changes: 26 additions & 23 deletions mkdocs/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,38 @@
What you will need in order to get started with libhal.

- `python`: 3.10 or above
- `conan`: 2.1.0 or above
- Suitable Compiler for running host tests (can be either of these):
- `gcc`: 12.3.0 or above
- `clang`: 17 and above
- `conan`: 2.2.0 or above
- `clang`: 17

=== "Ubuntu 22.04"
=== "Ubuntu 20.04+"

Python 3.10 is default installed, no need to install it.
Install Python 3.10 (only required for 20.04):

Install GCC, make (from build essentials):
```
sudo apt update
sudo apt install software-properties-common -y
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt install Python3.10
```

Install `llvm` toolchain & APT repos:

```
sudo apt update && sudo apt upgrade
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
sudo apt install -y build-essential g++-12
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
```

Install `clang-tidy-17`:
Install LLVM's C++ standard library (this will use the llvm apt repos):

```
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-17 main"
sudo apt-get install clang-tidy-17
sudo apt install libc++-17-dev libc++abi-17-dev
```

Installing conan:

```
python3 -m pip install "conan>=2.1.0"
python3 -m pip install "conan>=2.2.2"
```

=== "MacOS X"
Expand All @@ -44,16 +47,17 @@ What you will need in order to get started with libhal.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

Install latest version of Python 3.x && llvm:
Install latest version of Python && llvm:

```
brew install python llvm
brew install python
brew install llvm@17
```

Install conan:

```
python3 -m pip install "conan>=2.1.0"
python3 -m pip install "conan>=2.2.2"
```

Make `clang-tidy` available on the command line:
Expand All @@ -68,7 +72,6 @@ What you will need in order to get started with libhal.
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
```


=== "Windows"

We recommend using the `choco` package manager for windows as it allows
Expand All @@ -86,13 +89,13 @@ What you will need in order to get started with libhal.
If the `choco` command doesn't work after running this script try
closing and opening again PowerShell.

Now install `python`, `gcc` (via mingw):
Now install `python`:

```powershell
choco install python mingw
choco install python
```

Install clang-tidy 16 (via llvm):
Install llvm:

```powershell
choco install llvm --version=17.0.6
Expand All @@ -101,7 +104,7 @@ What you will need in order to get started with libhal.
Installing conan:

```powershell
python -m pip install -U "conan>=2.1.0"
python -m pip install -U "conan>=2.2.2"
```

---
Expand Down

0 comments on commit bc359ca

Please sign in to comment.