add dependabot from Woof! #231
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: Continuous Integration | |
| permissions: | |
| contents: write | |
| on: | |
| push: | |
| branches: [main] | |
| tags: ["*"] | |
| paths-ignore: ["**.md"] | |
| pull_request: | |
| branches: [main] | |
| paths-ignore: ["**.md"] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| name: ${{ matrix.config.name }} | |
| runs-on: ${{ matrix.config.os }} | |
| defaults: | |
| run: | |
| shell: ${{ matrix.config.shell }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - name: Linux x86_64 | |
| os: ubuntu-latest | |
| shell: bash | |
| package_name: linux_x86_64 | |
| artifact_path: build/*.zip | |
| install: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| clang \ | |
| lld \ | |
| libc++-dev \ | |
| libc++abi-dev \ | |
| ninja-build | |
| configure: | | |
| -G Ninja \ | |
| -DCMAKE_C_COMPILER=clang \ | |
| -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_LINKER=lld \ | |
| -DCMAKE_CXX_FLAGS="-stdlib=libc++" \ | |
| -DCMAKE_EXE_LINKER_FLAGS="-Wl,--gc-sections" | |
| - name: MacOS Universal | |
| os: macos-latest | |
| shell: bash | |
| package_name: macos_universal | |
| artifact_path: build/*.zip | |
| install: | | |
| brew update | |
| brew install ninja | |
| configure: | | |
| -G Ninja \ | |
| -DCMAKE_C_COMPILER=clang \ | |
| -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" | |
| - name: Windows MinGW x86_64 | |
| os: windows-latest | |
| shell: "msys2 {0}" | |
| msystem: mingw64 | |
| msys-env: mingw-w64-x86_64 | |
| package_name: windows_x86_64 | |
| artifact_path: build/*.zip | |
| install: | | |
| pacman -Syu --noconfirm | |
| pacman -S --noconfirm \ | |
| mingw-w64-x86_64-clang \ | |
| mingw-w64-x86_64-clang-tools-extra \ | |
| mingw-w64-x86_64-lld \ | |
| mingw-w64-x86_64-cmake \ | |
| mingw-w64-x86_64-ninja \ | |
| mingw-w64-x86_64-git | |
| configure: | | |
| -G Ninja \ | |
| -DCMAKE_C_COMPILER=clang \ | |
| -DCMAKE_CXX_COMPILER=clang++ \ | |
| -DCMAKE_LINKER=lld \ | |
| -DCMAKE_EXE_LINKER_FLAGS="-static -Wl,--gc-sections" \ | |
| -DCMAKE_SHARED_LINKER_FLAGS="-static" | |
| steps: | |
| - name: Setup MSYS2 | |
| if: matrix.config.shell == 'msys2 {0}' | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: ${{ matrix.config.msystem }} | |
| update: true | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required so we can move and push tags | |
| - name: Install dependencies | |
| run: ${{ matrix.config.install }} | |
| - name: Configure (Release) | |
| if: ${{ contains(github.ref, 'tags') }} | |
| run: >- | |
| cmake | |
| -S . | |
| -B build | |
| -DCMAKE_BUILD_TYPE=Release | |
| ${{ matrix.config.configure }} | |
| - name: Configure (Nightly) | |
| if: ${{ !contains(github.ref, 'tags') }} | |
| run: >- | |
| cmake | |
| -S . | |
| -B build | |
| -DCMAKE_BUILD_TYPE=Release | |
| -DCPACK_PACKAGE_VERSION=nightly | |
| ${{ matrix.config.configure }} | |
| - name: Build | |
| run: cmake --build build | |
| - name: Install | |
| run: | | |
| cd build | |
| cpack | |
| - name: Extract Version Number (Release) | |
| if: contains(github.ref, 'tags') | |
| shell: bash | |
| run: echo "VERSION=${GITHUB_REF##*_}" >> $GITHUB_ENV | |
| - name: Extract Version Number (Development) | |
| if: "!contains(github.ref, 'tags')" | |
| shell: bash | |
| run: echo "VERSION=${GITHUB_SHA::7}" >> $GITHUB_ENV | |
| - name: Upload Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: elfbsp_${{ env.VERSION }}_${{ matrix.config.package_name }} | |
| path: ${{ matrix.config.artifact_path }} | |
| - name: Release | |
| if: ${{ contains(github.ref, 'tags') }} | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: ELFBSP ${{ env.VERSION }} | |
| bodyFile: CHANGELOG.md | |
| allowUpdates: true | |
| artifacts: ${{ matrix.config.artifact_path }} | |
| - name: Update Nightly Tag | |
| if: ${{ !contains(github.ref, 'tags') && github.ref == 'refs/heads/main' }} | |
| run: | | |
| git tag -f nightly | |
| git push -f origin nightly | |
| - name: Nightly Pre-Release | |
| if: ${{ !contains(github.ref, 'tags') && github.ref == 'refs/heads/main' }} | |
| uses: ncipollo/release-action@v1 | |
| with: | |
| name: "[Nightly] ELFBSP ${{ env.VERSION }}" | |
| bodyFile: CHANGELOG.md | |
| tag: nightly | |
| commit: main | |
| prerelease: true | |
| allowUpdates: true | |
| artifacts: ${{ matrix.config.artifact_path }} |