Skip to content

Commit

Permalink
Move examples above inputs/outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleMayes committed Mar 31, 2024
1 parent be40c5a commit bb35fbb
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 30 deletions.
5 changes: 5 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"arrowParens": "avoid",
"printWidth": 100,
"trailingComma": "all"
}
60 changes: 30 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,36 @@ The binaries will be added to the relevant environment variables for the platfor

Released under the Apache License 2.0.

## Example Usage

```yml
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
```

## Example Usage (with non-default installation directory):

```yml
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
directory: ${{ runner.temp }}/llvm
```

## Linking to Installed Libraries (Linux)

If your build system requires a library from the installed LLVM and Clang binaries such as `libclang.so`, and it fails to find it, then it may help to create a symlink for the versioned `.so` using the following step which utilizes the `LLVM_PATH` environment variable set by this action:

```yaml
- name: Symlink libclang.so (Linux)
if: contains(matrix.os, 'ubuntu')
run: sudo ln -s libclang-11.so.1 /lib/x86_64-linux-gnu/libclang.so
working-directory: ${{ env.LLVM_PATH }}/lib
```

## Inputs

### `version`
Expand Down Expand Up @@ -67,33 +97,3 @@ Whether to set `CC` and `CXX` environment variables to Clang paths.
The full version of LLVM and Clang binaries installed.

This will only differ from the value of the `version` option when specifying a minimum version like `3.6` or `3`.

## Example Usage

```yml
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
```

## Example Usage (with non-default installation directory):

```yml
- name: Install LLVM and Clang
uses: KyleMayes/install-llvm-action@v1
with:
version: "10.0"
directory: ${{ runner.temp }}/llvm
```

## Linking to Installed Libraries (Linux)

If your build system requires a library from the installed LLVM and Clang binaries such as `libclang.so`, and it fails to find it, then it may help to create a symlink for the versioned `.so` using the following step which utilizes the `LLVM_PATH` environment variable set by this action:

```yaml
- name: Symlink libclang.so (Linux)
if: contains(matrix.os, 'ubuntu')
run: sudo ln -s libclang-11.so.1 /lib/x86_64-linux-gnu/libclang.so
working-directory: ${{ env.LLVM_PATH }}/lib
```
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"license": "Apache-2.0",
"main": "dist/index.js",
"scripts": {
"format": "prettier --write src/*.ts",
"build": "parcel build index.ts",
"test": "ts-node test.ts test"
},
Expand Down

0 comments on commit bb35fbb

Please sign in to comment.