Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MorganCaron committed Mar 6, 2024
1 parent 40ac6d0 commit 1caf468
Showing 1 changed file with 38 additions and 5 deletions.
43 changes: 38 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,51 @@ on: [ push, pull_request ]

jobs:
build:
name: "Clang"
name: "Latest Clang"
steps:
- uses: actions/checkout@v4
- uses: MorganCaron/latest-clang-action@master

- name: Compile
env:
CC: "clang"
CXX: "clang++"
run: |
clang++ -o test test.cpp
./test
- name: Run
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/llvm/lib/x86_64-unknown-linux-gnu
run: |
./test
```

Or with [XMake](https://xmake.io/):
```yml
name: "Build with latest Clang"

on: [ push, pull_request ]

jobs:
build:
name: "XMake + Latest Clang"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- uses: MorganCaron/latest-clang-action@master

# https://xmake.io/#/guide/installation
- name: Install XMake
run: |
curl -fsSL https://xmake.io/shget.text | bash
- name: Compile
run: |
xmake f --toolchain=llvm --sdk=llvm/
xmake build -vD
- name: Run
env:
LD_LIBRARY_PATH: ${{ github.workspace }}/llvm/lib/x86_64-unknown-linux-gnu
run: |
xmake run
```

0 comments on commit 1caf468

Please sign in to comment.