|
| 1 | +name: Build Release |
| 2 | +on: [push, workflow_dispatch] |
| 3 | + |
| 4 | +jobs: |
| 5 | + build: |
| 6 | + name: ${{ matrix.name }} |
| 7 | + runs-on: ${{ matrix.runs-on }} |
| 8 | + strategy: |
| 9 | + fail-fast: false |
| 10 | + matrix: |
| 11 | + include: |
| 12 | + - name: Build - Ubuntu |
| 13 | + short-name: lin64 |
| 14 | + runs-on: ubuntu-latest |
| 15 | + compiler: clang |
| 16 | + cxx-compiler: clang++ |
| 17 | + |
| 18 | + - name: Build - macOS |
| 19 | + short-name: mac64 |
| 20 | + runs-on: macos-latest |
| 21 | + |
| 22 | + - name: Build - Windows |
| 23 | + short-name: win64 |
| 24 | + runs-on: windows-latest |
| 25 | + cmake-args: -DCMAKE_GENERATOR_PLATFORM=x64 |
| 26 | + |
| 27 | + steps: |
| 28 | + - name: Checkout repository |
| 29 | + uses: actions/checkout@v3 |
| 30 | + |
| 31 | + - name: Install packages (Ubuntu) |
| 32 | + if: runner.os == 'Linux' |
| 33 | + run: sudo apt-get install -y ninja-build |
| 34 | + |
| 35 | + - name: Download Linux Syscall Support |
| 36 | + if: runner.os == 'Linux' |
| 37 | + run: git clone https://chromium.googlesource.com/linux-syscall-support src/third_party/lss |
| 38 | + |
| 39 | + - name: Compiling source code |
| 40 | + run: | |
| 41 | + cmake -S . -B build ${{ matrix.cmake-args }} -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=MinSizeRel |
| 42 | + cmake --build build --config MinSizeRel |
| 43 | + env: |
| 44 | + CC: ${{ matrix.compiler }} |
| 45 | + CXX: ${{ matrix.cxx-compiler }} |
| 46 | + |
| 47 | + - name: Upload artifacts (Windows) |
| 48 | + uses: actions/upload-artifact@v3 |
| 49 | + if: runner.os == 'Windows' |
| 50 | + with: |
| 51 | + name: breakpad-utilities-${{ matrix.short-name }} |
| 52 | + path: | |
| 53 | + build/MinSizeRel/minidump* |
| 54 | + build/MinSizeRel/dump_sym* |
| 55 | + build/MinSizeRel/msdia* |
| 56 | + retention-days: 7 |
| 57 | + |
| 58 | + - name: Upload artifacts (Linux) |
| 59 | + uses: actions/upload-artifact@v3 |
| 60 | + if: runner.os != 'Windows' |
| 61 | + with: |
| 62 | + name: breakpad-utilities-${{ matrix.short-name }} |
| 63 | + path: | |
| 64 | + build/minidump* |
| 65 | + build/dump_sym* |
| 66 | + retention-days: 7 |
| 67 | + |
| 68 | + - name: Package release (macOS/Linux) |
| 69 | + shell: bash |
| 70 | + if: runner.os != 'Windows' |
| 71 | + run: zip ../breakpad-utilities-${{ matrix.short-name }}.zip minidump* dump_sym* |
| 72 | + working-directory: build |
| 73 | + |
| 74 | + - name: Package release (Windows) |
| 75 | + if: runner.os == 'Windows' |
| 76 | + shell: bash |
| 77 | + run: 7z a -tzip ../../breakpad-utilities-${{ matrix.short-name }}.zip minidump*.exe dump_sym*.exe msdia*.dll |
| 78 | + working-directory: build/MinSizeRel |
| 79 | + |
| 80 | + - name: Upload release |
| 81 | + uses: svenstaro/upload-release-action@v1-release |
| 82 | + if: env.GITHUB_TOKEN != '' |
| 83 | + with: |
| 84 | + asset_name: breakpad-utilities-${{ matrix.short-name }}.zip |
| 85 | + file: breakpad-utilities-${{ matrix.short-name }}.zip |
| 86 | + tag: latest |
| 87 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 88 | + overwrite: true |
| 89 | + env: |
| 90 | + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" |
0 commit comments