|
| 1 | +name: ci-linux-musl |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + pull_request: |
| 6 | + push: |
| 7 | + release: |
| 8 | + types: [published] |
| 9 | + |
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
| 14 | +permissions: {} |
| 15 | + |
| 16 | +jobs: |
| 17 | + build: |
| 18 | + runs-on: ubuntu-24.04 |
| 19 | + container: alpine:edge |
| 20 | + permissions: |
| 21 | + contents: read |
| 22 | + strategy: |
| 23 | + fail-fast: false |
| 24 | + matrix: |
| 25 | + build_method: ["python", "cmake"] |
| 26 | + |
| 27 | + steps: |
| 28 | + - name: Host - checkout |
| 29 | + uses: actions/checkout@v4 |
| 30 | + with: |
| 31 | + fetch-depth: 0 |
| 32 | + persist-credentials: false |
| 33 | + |
| 34 | + - name: Install ninja build optional dependencies |
| 35 | + run: apk update && apk add -u --no-cache python3 build-base cmake re2c |
| 36 | + |
| 37 | + - name: Configure ninja build |
| 38 | + if: matrix.build_method == 'cmake' |
| 39 | + run: cmake -B build -D CMAKE_BUILD_TYPE="Release" |
| 40 | + |
| 41 | + - name: Cmake Build ninja |
| 42 | + if: matrix.build_method == 'cmake' |
| 43 | + run: cmake --build build --parallel --config Release |
| 44 | + |
| 45 | + - name: Cmake test ninja |
| 46 | + if: matrix.build_method == 'cmake' |
| 47 | + run: build/ninja_test --gtest_color=yes |
| 48 | + |
| 49 | + - name: Python Build ninja |
| 50 | + if: matrix.build_method == 'python' |
| 51 | + run: python3 configure.py --bootstrap --verbose |
| 52 | + |
| 53 | + - name: Python test ninja |
| 54 | + if: matrix.build_method == 'python' |
| 55 | + run: | |
| 56 | + ./ninja all |
| 57 | + python3 misc/ninja_syntax_test.py |
| 58 | + # python3 misc/output_test.py |
| 59 | +
|
| 60 | + - name: Move ninja binary |
| 61 | + if: matrix.build_method == 'cmake' |
| 62 | + run: mv -f build/ninja ninja |
| 63 | + |
| 64 | + - name: ninja-ninja --version |
| 65 | + run: ./ninja --version >> $GITHUB_STEP_SUMMARY |
| 66 | + |
| 67 | + - name: binary info via file |
| 68 | + run: file ./ninja >> $GITHUB_STEP_SUMMARY |
0 commit comments