whitespace #25
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: USBSID-Player Build | |
| env: | |
| BUILD_THREADS: 4 | |
| BUILD_TYPE: Release | |
| on: | |
| push: | |
| paths: | |
| - "CMakeLists.txt" | |
| - "src/**" | |
| - "lib/**" | |
| - ".github/workflows/build.yml" | |
| # Allows you to run this workflow manually from the Actions tab when needed | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: Build | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/') }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest, shell: bash, buildname: usbsid } | |
| - { os: macos-14, shell: bash, buildname: usbsid } | |
| - { os: macos-15-intel, shell: bash, buildname: usbsid } | |
| - { os: windows-2022, shell: 'msys2 {0}', buildname: usbsid } | |
| defaults: | |
| run: | |
| shell: ${{ matrix.shell }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| # Forces checkout of the branch head instead of a specific commit SHA | |
| ref: ${{ github.ref }} | |
| submodules: true | |
| path: repo | |
| - name: Install dependencies (Ubuntu) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config cmake build-essential libusb-1.0-0 libusb-1.0-0-dev libudev1 libudev-dev | |
| - name: Install dependencies (MacOs) | |
| if: matrix.os == 'macos-14' || matrix.os == 'macos-15-intel' | |
| run: | | |
| brew update | |
| # - name: Install xa dependency | |
| # if: matrix.os == 'ubuntu-latest' | |
| # run: | | |
| # sudo apt-get update && sudo apt-get install -y xa65 | |
| # - name: Checkout bin2h source | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # repository: elnormous/bin2h | |
| # path: bin2h-src | |
| # - name: Build and add to PATH | |
| # run: | | |
| # cd bin2h-src | |
| # make | |
| # # Add the current directory containing the built 'bin2h' to the runner's PATH | |
| # echo "$(pwd)" >> $GITHUB_PATH | |
| # - name: Verify installation | |
| # run: bin2h --help | |
| - name: Set up MSYS2 (Windows) | |
| if: matrix.os == 'windows-2022' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW64 | |
| update: true | |
| install: >- | |
| mingw-w64-x86_64-gcc | |
| mingw-w64-x86_64-libusb | |
| mingw-w64-x86_64-cmake | |
| mingw-w64-x86_64-pkg-config | |
| mingw-w64-x86_64-ninja | |
| - name: Configure and build ${{ matrix.buildname }} | |
| run: | | |
| pushd repo | |
| cmake -S . -B build -DEXECUTABLE=${{ matrix.buildname }} && cmake --build build -j$(nproc) | |
| ls -lhai | |
| popd | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.buildname }}-${{ matrix.os }} | |
| path: repo/${{ matrix.buildname }}* | |
| if-no-files-found: ignore |