|
| 1 | +name: Create Clang Release |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + tags: |
| 6 | + - 'v*' |
| 7 | + |
| 8 | +jobs: |
| 9 | + create-release: |
| 10 | + runs-on: ubuntu-latest |
| 11 | + |
| 12 | + steps: |
| 13 | + - name: Download Linux artifact |
| 14 | + uses: dawidd6/action-download-artifact@v3 |
| 15 | + with: |
| 16 | + workflow: build-clang.yml |
| 17 | + commit: ${{ github.sha }} |
| 18 | + name: clang-nullsafe-linux-x86_64 |
| 19 | + path: artifacts/ |
| 20 | + |
| 21 | + - name: Download macOS artifact |
| 22 | + uses: dawidd6/action-download-artifact@v3 |
| 23 | + with: |
| 24 | + workflow: build-clang.yml |
| 25 | + commit: ${{ github.sha }} |
| 26 | + name: clang-nullsafe-macos-universal |
| 27 | + path: artifacts/ |
| 28 | + |
| 29 | + - name: Download Windows artifact |
| 30 | + uses: dawidd6/action-download-artifact@v3 |
| 31 | + with: |
| 32 | + workflow: build-clang.yml |
| 33 | + commit: ${{ github.sha }} |
| 34 | + name: clang-nullsafe-windows-x86_64 |
| 35 | + path: artifacts/ |
| 36 | + |
| 37 | + - name: Create Release |
| 38 | + uses: softprops/action-gh-release@v1 |
| 39 | + with: |
| 40 | + files: | |
| 41 | + artifacts/clang-nullsafe-linux-x86_64.tar.gz |
| 42 | + artifacts/clang-nullsafe-macos-universal.tar.gz |
| 43 | + artifacts/clang-nullsafe-windows-x86_64.tar.gz |
| 44 | + body: | |
| 45 | + ## Null-Safe Clang Binary Release |
| 46 | +
|
| 47 | + This release contains the Null-Safe Clang compiler and clangd language server for Linux, macOS, and Windows. |
| 48 | +
|
| 49 | + ### What's included: |
| 50 | + - `clang` - The Null-Safe C compiler |
| 51 | + - `clangd` - Language server for IDE integration (VSCode, vim, etc.) |
| 52 | +
|
| 53 | + ### Installation: |
| 54 | +
|
| 55 | + **Linux / macOS:** |
| 56 | + ```bash |
| 57 | + tar -xzf clang-nullsafe-<platform>.tar.gz |
| 58 | + export PATH=$PWD/bin:$PATH |
| 59 | + clang --version |
| 60 | + ``` |
| 61 | +
|
| 62 | + **Windows:** |
| 63 | + ```bash |
| 64 | + tar -xzf clang-nullsafe-windows-x86_64.tar.gz |
| 65 | + # Add bin/ directory to your PATH |
| 66 | + clang --version |
| 67 | + ``` |
| 68 | +
|
| 69 | + ### Usage: |
| 70 | + ```bash |
| 71 | + # Compile with null-safety warnings (default) |
| 72 | + clang mycode.c |
| 73 | +
|
| 74 | + # Promote warnings to errors |
| 75 | + clang -Werror=nullability mycode.c |
| 76 | +
|
| 77 | + # Disable null-safety checking |
| 78 | + clang -fno-strict-nullability mycode.c |
| 79 | + ``` |
| 80 | +
|
| 81 | + See the [README](https://github.com/cs01/llvm-project/blob/null-safe-c-dev/README.md) for full documentation. |
| 82 | + env: |
| 83 | + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments