optimize qemu params on x86_64 #6
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| test: | |
| name: Test on ${{ matrix.os }} with ${{ matrix.compiler }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macOS-latest] | |
| compiler: [dmd-latest, ldc-latest] | |
| include: | |
| - os: windows-latest | |
| compiler: dmd-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install D compiler | |
| uses: dlang-community/setup-dlang@v1 | |
| with: | |
| compiler: ${{ matrix.compiler }} | |
| - name: Install QEMU (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y qemu-system-x86 | |
| - name: Install QEMU (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install qemu | |
| - name: Install QEMU (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| choco install qemu | |
| echo "C:\Program Files\qemu" >> $GITHUB_PATH | |
| - name: Cache DUB dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.dub | |
| key: ${{ runner.os }}-dub-${{ hashFiles('**/dub.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-dub- | |
| - name: Build project | |
| run: dub build | |
| - name: Run unit tests | |
| run: dub test | |
| - name: Run comprehensive tests | |
| run: | | |
| cd test | |
| rdmd runner.d | |
| - name: Test help output | |
| run: ./qboot --help || true | |
| - name: Check for memory leaks (Linux only) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get install -y valgrind | |
| valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes ./qboot --help || true | |
| code-quality: | |
| name: Code Quality | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install D compiler | |
| uses: dlang-community/setup-dlang@v1 | |
| with: | |
| compiler: dmd-latest | |
| - name: Install code quality tools | |
| run: | | |
| dub fetch dfmt | |
| dub fetch dscanner | |
| - name: Check code formatting | |
| run: | | |
| dub run dfmt -- --verify source/ | |
| dub run dfmt -- --verify test/ | |
| - name: Run static analysis | |
| run: | | |
| dub run dscanner -- --styleCheck source/ | |
| dub run dscanner -- --styleCheck test/ | |
| build-matrix: | |
| name: Build Matrix | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| build-type: [debug, release, unittest] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install D compiler | |
| uses: dlang-community/setup-dlang@v1 | |
| with: | |
| compiler: dmd-latest | |
| - name: Build ${{ matrix.build-type }} | |
| run: | | |
| if [ "${{ matrix.build-type }}" = "unittest" ]; then | |
| dub test --build=unittest | |
| else | |
| dub build --build=${{ matrix.build-type }} | |
| fi | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: qboot-${{ matrix.build-type }} | |
| path: qboot* | |
| retention-days: 7 | |
| documentation: | |
| name: Documentation Check | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Check README | |
| run: | | |
| if [ ! -f README.md ]; then | |
| echo "README.md is missing" | |
| exit 1 | |
| fi | |
| - name: Check CHANGELOG | |
| run: | | |
| if [ ! -f CHANGELOG.md ]; then | |
| echo "CHANGELOG.md is missing" | |
| exit 1 | |
| fi | |
| - name: Check LICENSE | |
| run: | | |
| if [ ! -f LICENSE ]; then | |
| echo "LICENSE file is missing" | |
| exit 1 | |
| fi | |
| - name: Validate JSON files | |
| run: | | |
| if command -v jq > /dev/null; then | |
| find . -name "*.json" -exec jq empty {} \; | |
| fi |