Add copilot setup. #1
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: "Copilot Setup Steps" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - .github/workflows/copilot-setup-steps.yml | |
| pull_request: | |
| paths: | |
| - .github/workflows/copilot-setup-steps.yml | |
| jobs: | |
| copilot-setup-steps: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Install opam | |
| run: | | |
| sudo apt update | |
| sudo apt install -y opam | |
| opam init --bare | |
| - name: Install Z3 | |
| run: | | |
| echo "PATH=/usr/local/bin/:$PATH" >> $GITHUB_ENV | |
| sudo ./opt/fstar/.scripts/get_fstar_z3.sh /usr/local/bin/ | |
| - name: Compute cache key | |
| id: cachekey | |
| run: | | |
| echo "cachekey=$(./opt/ci-deps-hash)" >> "$GITHUB_OUTPUT" | |
| - name: Get cache | |
| id: getcache | |
| uses: actions/cache/restore@v4 | |
| with: | |
| path: opt | |
| key: ${{ steps.cachekey.outputs.cachekey }} | |
| - name: Restore changes to files in opt | |
| run: | | |
| git reset --hard | |
| - name: Build dependencies | |
| run: | | |
| make -j$(nproc) build-pulse | |
| - name: Save cache | |
| if: ${{ steps.getcache.outputs.cache-hit != 'true' }} | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: opt | |
| key: ${{ steps.cachekey.outputs.cachekey }} | |
| - name: Install clang | |
| run: | | |
| wget https://apt.llvm.org/llvm.sh | |
| chmod +x llvm.sh | |
| sudo ./llvm.sh 20 | |
| sudo apt update | |
| sudo apt install -y clang-20 libclang-cpp20-dev g++ clang-tools-20 libclang-20-dev |