Add concurrency control to gh-pages deployment #8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Null-Safe Clang Binaries | |
| on: | |
| push: | |
| branches: | |
| - null-safe-c-dev | |
| workflow_dispatch: | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y ninja-build cmake build-essential ccache | |
| - name: Setup ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.ccache | |
| key: ccache-linux-${{ github.sha }} | |
| restore-keys: | | |
| ccache-linux- | |
| - name: Configure build | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ | |
| -DLLVM_TARGETS_TO_BUILD="X86" \ | |
| -DLLVM_ENABLE_ASSERTIONS=OFF \ | |
| -DCMAKE_INSTALL_PREFIX=../install \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| ../llvm | |
| - name: Build Clang and clangd | |
| run: | | |
| cd build | |
| ninja clang clangd | |
| - name: Install Clang and clangd | |
| run: | | |
| cd build | |
| ninja install-clang | |
| ninja install-clang-headers | |
| ninja install-clangd | |
| - name: Package binaries | |
| run: | | |
| cd install | |
| tar -czf clang-nullsafe-linux-x86_64.tar.gz bin/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: clang-nullsafe-linux-x86_64 | |
| path: install/clang-nullsafe-linux-x86_64.tar.gz | |
| build-macos: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| brew install ninja cmake ccache | |
| - name: Setup ccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/Library/Caches/ccache | |
| key: ccache-macos-${{ github.sha }} | |
| restore-keys: | | |
| ccache-macos- | |
| - name: Configure build | |
| run: | | |
| mkdir -p build | |
| cd build | |
| cmake -G Ninja \ | |
| -DCMAKE_BUILD_TYPE=Release \ | |
| -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" \ | |
| -DLLVM_TARGETS_TO_BUILD="AArch64;X86" \ | |
| -DLLVM_ENABLE_ASSERTIONS=OFF \ | |
| -DCMAKE_INSTALL_PREFIX=../install \ | |
| -DCMAKE_C_COMPILER_LAUNCHER=ccache \ | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | |
| ../llvm | |
| - name: Build Clang and clangd | |
| run: | | |
| cd build | |
| ninja clang clangd | |
| - name: Install Clang and clangd | |
| run: | | |
| cd build | |
| ninja install-clang | |
| ninja install-clang-headers | |
| ninja install-clangd | |
| - name: Package binaries | |
| run: | | |
| cd install | |
| tar -czf clang-nullsafe-macos-universal.tar.gz bin/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: clang-nullsafe-macos-universal | |
| path: install/clang-nullsafe-macos-universal.tar.gz | |
| build-windows: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install dependencies | |
| run: | | |
| choco install ninja cmake sccache | |
| - name: Setup sccache | |
| uses: actions/cache@v4 | |
| with: | |
| path: C:\Users\runneradmin\AppData\Local\Mozilla\sccache | |
| key: sccache-windows-${{ github.sha }} | |
| restore-keys: | | |
| sccache-windows- | |
| - name: Configure build | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake -G Ninja ` | |
| -DCMAKE_BUILD_TYPE=Release ` | |
| -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ` | |
| -DLLVM_TARGETS_TO_BUILD="X86" ` | |
| -DLLVM_ENABLE_ASSERTIONS=OFF ` | |
| -DCMAKE_INSTALL_PREFIX=../install ` | |
| -DCMAKE_C_COMPILER_LAUNCHER=sccache ` | |
| -DCMAKE_CXX_COMPILER_LAUNCHER=sccache ` | |
| ../llvm | |
| - name: Build Clang and clangd | |
| run: | | |
| cd build | |
| ninja clang clangd | |
| - name: Install Clang and clangd | |
| run: | | |
| cd build | |
| ninja install-clang | |
| ninja install-clang-headers | |
| ninja install-clangd | |
| - name: Package binaries | |
| run: | | |
| cd install | |
| tar -czf clang-nullsafe-windows-x86_64.tar.gz bin/ | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: clang-nullsafe-windows-x86_64 | |
| path: install/clang-nullsafe-windows-x86_64.tar.gz |