|
| 1 | +name: CI |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + paths-ignore: |
| 6 | + - '*.md' |
| 7 | + - '*.yml' |
| 8 | + pull_request: |
| 9 | + paths-ignore: |
| 10 | + - '*.md' |
| 11 | + - '*.yml' |
| 12 | + |
| 13 | +jobs: |
| 14 | + build-windows: |
| 15 | + runs-on: windows-latest |
| 16 | + env: |
| 17 | + POWERSHELL_TELEMETRY_OPTOUT: 1 |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + configuration: [Release, Debug] |
| 22 | + arch: [x86, x64] |
| 23 | + include: |
| 24 | + - arch: x86 |
| 25 | + platform: Win32 |
| 26 | + artifact_os: Win32 |
| 27 | + - arch: x64 |
| 28 | + platform: x64 |
| 29 | + artifact_os: Win64 |
| 30 | + steps: |
| 31 | + - uses: actions/checkout@v2 |
| 32 | + - name: CMake generate |
| 33 | + run: | |
| 34 | + mkdir build && cd build |
| 35 | + cmake .. -A ${{ matrix.platform }} |
| 36 | + - name: Build |
| 37 | + working-directory: build |
| 38 | + run: cmake --build . --config ${{ matrix.configuration }} -j $env:NUMBER_OF_PROCESSORS |
| 39 | + - name: Prepare artifacts |
| 40 | + run: | |
| 41 | + mkdir artifacts |
| 42 | + mv -vb build\${{ matrix.configuration }}\extract-xiso.exe, LICENSE.TXT artifacts |
| 43 | + - uses: actions/upload-artifact@v2 |
| 44 | + with: |
| 45 | + name: extract-xiso_${{ matrix.artifact_os }}_${{ matrix.configuration }} |
| 46 | + path: artifacts |
| 47 | + |
| 48 | + build-linux: |
| 49 | + runs-on: ubuntu-latest |
| 50 | + steps: |
| 51 | + - uses: actions/checkout@v2 |
| 52 | + - name: CMake generate |
| 53 | + run: | |
| 54 | + mkdir build && cd build |
| 55 | + cmake .. |
| 56 | + - name: Build |
| 57 | + working-directory: build |
| 58 | + run: cmake --build . -j $(nproc --all) |
| 59 | + - name: Prepare artifacts |
| 60 | + run: | |
| 61 | + mkdir artifacts |
| 62 | + mv -v build/extract-xiso LICENSE.TXT artifacts |
| 63 | + - uses: actions/upload-artifact@v2 |
| 64 | + with: |
| 65 | + name: extract-xiso_${{ runner.os }} |
| 66 | + path: artifacts |
| 67 | + |
| 68 | + build-macos: |
| 69 | + runs-on: macos-latest |
| 70 | + steps: |
| 71 | + - uses: actions/checkout@v2 |
| 72 | + - name: CMake generate |
| 73 | + run: | |
| 74 | + mkdir build && cd build |
| 75 | + cmake .. |
| 76 | + - name: Build |
| 77 | + working-directory: build |
| 78 | + run: cmake --build . -j $(sysctl -n hw.ncpu) |
| 79 | + - name: Prepare artifacts |
| 80 | + run: | |
| 81 | + mkdir artifacts |
| 82 | + mv -v build/extract-xiso LICENSE.TXT artifacts |
| 83 | + - uses: actions/upload-artifact@v2 |
| 84 | + with: |
| 85 | + name: extract-xiso_${{ runner.os }} |
| 86 | + path: artifacts |
0 commit comments