daiyongyuan is running CI Test 🚀 #559
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: Buckyball CI | |
| run-name: ${{ github.actor }} is running CI Test 🚀 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| checks: write | |
| # limit the number of concurrent jobs to 1, to avoid resource contention | |
| concurrency: | |
| group: buckyball-cpu-server | |
| cancel-in-progress: false | |
| jobs: | |
| CI-Test: | |
| name: CI Test | |
| runs-on: cpu-server | |
| env: | |
| ALL_PROXY: socks5h://127.0.0.1:7890 | |
| steps: | |
| - name: Print information | |
| run: | | |
| echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| echo "🔎 PR #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}" | |
| echo "🔎 Branch: ${{ github.head_ref }} -> ${{ github.base_ref }}" | |
| else | |
| echo "🔎 Branch: ${{ github.ref_name }}" | |
| fi | |
| echo "🔎 Repository: ${{ github.repository }}" | |
| - name: Reset to clean state | |
| shell: zsh {0} | |
| run: | | |
| cd ~/Code/buckyball | |
| git fetch --force --prune origin "${{ github.ref }}" | |
| git checkout --detach FETCH_HEAD | |
| git reset --hard FETCH_HEAD | |
| git clean -ffd | |
| git submodule sync bbdev bebop compiler/thirdparty/buddy-mlir | |
| git submodule update --init --force bbdev bebop compiler/thirdparty/buddy-mlir | |
| for submodule in bbdev bebop compiler/thirdparty/buddy-mlir; do | |
| git -C "$submodule" reset --hard | |
| git -C "$submodule" clean -ffd | |
| done | |
| - name: Nix build | |
| shell: zsh {0} | |
| run: | | |
| cd ~/Code/buckyball | |
| nix build | |
| - name: Build Compiler | |
| shell: zsh {0} | |
| run: | | |
| cd ~/Code/buckyball | |
| nix develop -c bbdev compiler --build '--chip toy' | |
| - name: Build Workloads | |
| shell: zsh {0} | |
| run: | | |
| cd ~/Code/buckyball | |
| nix develop -c bbdev workload --clean | |
| nix develop -c bbdev workload --build '--chip toy' | |
| - name: bemu Tests | |
| shell: zsh {0} | |
| run: | | |
| cd ~/Code/buckyball | |
| nix develop -c bash -c "cd bebop && cargo clean && cd .." | |
| nix develop -c bbdev bebop-bemu --batch '--chip toy --test elf-tests --clean-before' | |
| nix develop -c bbdev bebop-bemu --batch '--chip toy --test pk-tests --clean-before' | |
| - name: verilator Tests | |
| shell: zsh {0} | |
| run: | | |
| cd ~/Code/buckyball | |
| nix develop -c bbdev bebop-verilator --clean '--config sims.verilator.BuckyballToyVerilatorConfig' | |
| nix develop -c bbdev bebop-verilator --verilog '--config sims.verilator.BuckyballToyVerilatorConfig' | |
| nix develop -c bbdev bebop-verilator --build '--jobs 16 --config sims.verilator.BuckyballToyVerilatorConfig' | |
| nix develop -c bbdev bebop-verilator --batch '--chip toy --config sims.verilator.BuckyballToyVerilatorConfig --test elf-tests --clean-before' | |
| - name: Detect bebop JUnit files | |
| if: always() | |
| id: junit | |
| shell: zsh {0} | |
| run: | | |
| files=(~/Code/buckyball/bebop/target/nextest/default/target/nextest/junit-bbdev-*.xml(N)) | |
| if (( ${#files} == 0 )); then | |
| echo "JUnit files not found" | |
| echo "found=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "JUnit files: ${files[@]}" | |
| echo "found=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Publish bebop test report | |
| if: always() && steps.junit.outputs.found == 'true' | |
| uses: mikepenz/action-junit-report@v4 | |
| with: | |
| report_paths: "~/Code/buckyball/bebop/target/nextest/default/target/nextest/junit-bbdev-*.xml" | |
| check_name: "bebop nextest report" | |
| detailed_summary: true | |
| include_passed: true | |
| - name: Upload bebop JUnit artifacts | |
| if: always() && steps.junit.outputs.found == 'true' | |
| uses: actions/upload-artifact@v4 | |
| env: | |
| ALL_PROXY: "" | |
| HTTP_PROXY: "" | |
| HTTPS_PROXY: "" | |
| NO_PROXY: github.com,api.github.com,uploads.github.com,objects.githubusercontent.com,.blob.core.windows.net | |
| with: | |
| name: bebop-nextest-junit | |
| path: "~/Code/buckyball/bebop/target/nextest/default/target/nextest/junit-bbdev-*.xml" | |
| # if check failed, revert the branch | |
| # - name: Revert Bad Commit | |
| # if: failure() | |
| # shell: zsh {0} | |
| # run: | | |
| # source ~/.zshrc | |
| # buckyball_exec | |
| # setproxy | |
| # git reset --hard HEAD~1 | |
| # git push --force origin main |