Build #2
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 | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'The git ref (branch, tag, or SHA) to build' | |
| required: true | |
| type: string | |
| jobs: | |
| compile-difftest-so: | |
| strategy: | |
| matrix: | |
| cpu: ['xs', 'xs-dual'] | |
| type: ['ref', 'ref-debug'] | |
| fail-fast: false | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/openxiangshan/xs-env:ubuntu-20.04 | |
| continue-on-error: false | |
| name: Compile NEMU for (${{ matrix.cpu }}-${{ matrix.type }}) | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| ref: ${{ github.event.inputs.ref || github.ref }} | |
| - name: Setup env | |
| run: | | |
| echo "NEMU_HOME=$GITHUB_WORKSPACE" >> $GITHUB_ENV | |
| - name: Compile dynamic library | |
| run: | | |
| make riscv64-${{ matrix.cpu }}-${{ matrix.type }}_defconfig | |
| make -j | |
| - name: Prepare artifact | |
| run: | | |
| mkdir -p artifact | |
| cp build/riscv64-nemu-interpreter-so artifact/nemu-${{ matrix.cpu }}-${{ matrix.type }}.so | |
| - name: Archive artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: nemu-${{ matrix.cpu }}-${{ matrix.type }}.so | |
| path: | | |
| artifact/nemu-${{ matrix.cpu }}-${{ matrix.type }}.so |