Update Rust bindings to v0.7.0 #332
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: Emulator Build | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build-emulator: | |
| name: Build Emulator CLI | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| cmake \ | |
| ninja-build \ | |
| g++ | |
| - name: Build emulator with binary translation | |
| run: | | |
| cd emulator | |
| ./build.sh | |
| - name: Verify emulator binary | |
| run: | | |
| cd emulator/.build | |
| ls -lh laemu | |
| file laemu | |
| ./laemu --help | |
| - name: Run CoreMark benchmark | |
| run: | | |
| cd emulator/.build | |
| echo "=== Running CoreMark benchmark (with --fast and binary translation) ===" | |
| ./laemu --fast ../tests/programs/coremark.elf | tee coremark_output.txt | |
| # Extract and display CoreMark score | |
| SCORE=$(grep "CoreMark 1.0" coremark_output.txt | awk '{print $3}') | |
| echo "" | |
| echo "=== CoreMark Score: $SCORE ===" | |
| echo "coremark_score=$SCORE" >> $GITHUB_ENV | |
| - name: Create benchmark report | |
| run: | | |
| cd emulator/.build | |
| cat > coremark_report.md << EOF | |
| # CoreMark Benchmark Report | |
| **Platform:** Linux x86_64 (Ubuntu 24.04) | |
| **Build Configuration:** Release (GCC, Binary Translation enabled) | |
| **CoreMark Score:** ${coremark_score} | |
| ## Full Output | |
| \`\`\` | |
| EOF | |
| cat coremark_output.txt >> coremark_report.md | |
| echo '```' >> coremark_report.md | |
| cat coremark_report.md | |
| - name: Upload benchmark report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coremark-report-linux-x86_64 | |
| path: emulator/.build/coremark_report.md | |
| retention-days: 30 | |
| - name: Upload emulator artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: laemu-linux-x86_64 | |
| path: emulator/.build/laemu | |
| retention-days: 30 | |
| build-emulator-optimized: | |
| name: Build Emulator CLI (Optimized) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| cmake \ | |
| ninja-build \ | |
| g++ | |
| - name: Build optimized emulator with binary translation | |
| run: | | |
| cd emulator | |
| ./build.sh --native | |
| - name: Verify optimized emulator binary | |
| run: | | |
| cd emulator/.build | |
| ls -lh laemu | |
| file laemu | |
| ./laemu --help | |
| - name: Run CoreMark benchmark (optimized) | |
| run: | | |
| cd emulator/.build | |
| echo "=== Running CoreMark benchmark (with --fast, binary translation, and native optimizations) ===" | |
| ./laemu --fast ../tests/programs/coremark.elf | tee coremark_output_opt.txt | |
| # Extract and display CoreMark score | |
| SCORE=$(grep "CoreMark 1.0" coremark_output_opt.txt | awk '{print $3}') | |
| echo "" | |
| echo "=== CoreMark Score (Optimized): $SCORE ===" | |
| echo "coremark_score_opt=$SCORE" >> $GITHUB_ENV | |
| - name: Create benchmark report (optimized) | |
| run: | | |
| cd emulator/.build | |
| cat > coremark_report_opt.md << EOF | |
| # CoreMark Benchmark Report (Optimized) | |
| **Platform:** Linux x86_64 (Ubuntu 24.04) | |
| **Build Configuration:** Release (GCC, Binary Translation enabled, Native optimizations) | |
| **CoreMark Score:** ${coremark_score_opt} | |
| ## Full Output | |
| \`\`\` | |
| EOF | |
| cat coremark_output_opt.txt >> coremark_report_opt.md | |
| echo '```' >> coremark_report_opt.md | |
| cat coremark_report_opt.md | |
| - name: Upload benchmark report (optimized) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coremark-report-linux-x86_64-optimized | |
| path: emulator/.build/coremark_report_opt.md | |
| retention-days: 30 | |
| - name: Upload optimized emulator artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: laemu-linux-x86_64-optimized | |
| path: emulator/.build/laemu | |
| retention-days: 30 |