Skip to content

Commit 22b73c6

Browse files
committed
Update README for local tests
1 parent 86c7b85 commit 22b73c6

File tree

1 file changed

+44
-31
lines changed

1 file changed

+44
-31
lines changed

tests/README.md

Lines changed: 44 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,65 @@
11
# GLFM build tests
22

3-
## Automated tests
3+
The scripts in this directory test building GLFM and the GLFM examples. The analyzer `clang-tidy` is used if it is
4+
available.
45

5-
The [build.yml](../.github/workflows/build.yml) GitHub Action builds GLFM automatically for all target platforms and arc
6-
hitectures. Builds fail on compilation warnings or analyzer warnings.
6+
## Requirements
77

8-
The [build_examples.yml](../.github/workflows/build_examples.yml) GitHub Action builds GLFM examples automatically.
9-
Builds fail if deprecated functions are used.
8+
* CMake
9+
* Emscripten SDK
10+
* Android SDK/NDK
11+
* Xcode and xcpretty (macOS only)
12+
* clang-tidy (optional)
13+
14+
### Linux host
1015

11-
## Manual tests
16+
* Install CMake and clang-tidy with: `sudo apt install cmake clang-tidy`.
1217

13-
The scripts in this directory are similar to the GitHub Actions. The scripts work on Linux, macOS, and Windows (tested
14-
with git-bash/MINGW64). CMake is required.
18+
### macOS host
1519

16-
When running `build_all.sh`, GLFM is conditionally built for each target platform based on the tools installed:
20+
* Install Xcode from the App Store or from <https://developer.apple.com/download/applications/>.
21+
* Install CMake and xcpretty: `brew install cmake xcpretty`.
22+
* Optionally, install LLVM for clang-tidy: `brew install llvm`.
23+
* Launch Xcode once to make sure the iOS platform is installed.
1724

18-
* Apple platforms: Xcode is installed (macOS only).
19-
* Emscripten: emsdk is installed (`emcmake` is in the path).
20-
* Android: Android NDK 17 or newer is installed (`ANDROID_NDK_HOME` environment variable is set).
25+
### Windows host
2126

22-
On macOS, `ANDROID_NDK_HOME` is something like "~/Library/Android/sdk/ndk/23.2.8568313".
27+
* Install Git and CMake: `winget install Git.Git Kitware.CMake`.
28+
* For Emscripten, install Python and Ninja: `winget install python3 Ninja-build.Ninja`.
29+
* For Android, install OpenJDK: `winget install openjdk`.
30+
* Optionally, install LLVM for clang-tidy: `winget install LLVM.LLVM`.
2331

24-
## Analyzing with clang-tidy
32+
### Android
2533

26-
The build scripts run `clang-tidy` if it is available.
34+
* Install either Android Studio or the Android command line tools from <https://developer.android.com/studio>.
35+
* Install the NDK, either in Android Studio's SDK manager, or using command line with something like:
36+
```
37+
sdkmanager --list | grep ndk
38+
sdkmanager --install "ndk;28.0.13004108"
39+
```
40+
* Set the `ANDROID_NDK_HOME` environment variable to the location of the NDK, which looks something like:
41+
`~/Library/Android/sdk/ndk/28.0.13004108`.
2742

28-
The [clang-tidy-analyze.yml](clang-tidy-analyze.yml) file includes the parent [.clang-tidy](../.clang-tidy) checks and
29-
adds analyzer checks. Those extra analyzer checks take a bit longer to run.
43+
### Emscripten
3044

31-
The current list of checks in [.clang-tidy](../.clang-tidy) will likely change in the future.
45+
Install Emscripten SDK from <https://emscripten.org/docs/getting_started/downloads.html>. Alternatively, on macOS, use
46+
`brew install emscripten`.
3247

33-
For Apple platforms ([build_apple.sh](build_apple.sh)), the process of extracting info from `xcodebuild` and sending it
34-
to `clang-tidy` is a bit fragile and will likely break in the future. As of now, it works with Xcode 14.3 and clang-tidy
35-
16.
48+
The tests require that `emcmake` is in the path.
3649

37-
### Installing clang-tidy
50+
## Running
3851

39-
For Android targets, the Android NDK has a built in `clang-tidy`.
52+
Use `./build_all.sh` to run all tests.
4053

41-
For Emscripten targets on Ubuntu, install clang-tidy:
54+
On Windows, use `"C:\Program Files\Git\bin\bash.exe" build_all.sh`.
4255

43-
```
44-
sudo apt install clang-tidy
45-
```
56+
If a build fails, try `./build_all.sh -v`.
4657

47-
For Apple targets, both `xcpretty` and `clang-tidy` are required:
58+
## Automated tests
59+
60+
The [build.yml](../.github/workflows/build.yml) GitHub Action builds GLFM automatically for all target platforms and
61+
architectures. Builds fail on compilation warnings or analyzer warnings.
4862

49-
```
50-
brew install xcpretty llvm
51-
```
63+
The [build_examples.yml](../.github/workflows/build_examples.yml) GitHub Action builds GLFM examples automatically.
64+
Builds fail if deprecated functions are used.
5265

0 commit comments

Comments
 (0)