|
| 1 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 2 | +# or more contributor license agreements. See the NOTICE file |
| 3 | +# distributed with this work for additional information |
| 4 | +# regarding copyright ownership. The ASF licenses this file |
| 5 | +# to you under the Apache License, Version 2.0 (the |
| 6 | +# "License"); you may not use this file except in compliance |
| 7 | +# with the License. You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, |
| 12 | +# software distributed under the License is distributed on an |
| 13 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 14 | +# KIND, either express or implied. See the License for the |
| 15 | +# specific language governing permissions and limitations |
| 16 | +# under the License. |
| 17 | + |
| 18 | +name: Bindings D CI |
| 19 | + |
| 20 | +on: |
| 21 | + push: |
| 22 | + branches: |
| 23 | + - main |
| 24 | + tags: |
| 25 | + - "*" |
| 26 | + pull_request: |
| 27 | + branches: |
| 28 | + - main |
| 29 | + paths: |
| 30 | + - "core/**" |
| 31 | + - "bindings/c/**" |
| 32 | + - "bindings/d/**" |
| 33 | + - ".github/workflows/ci_bindings_d.yml" |
| 34 | + workflow_dispatch: |
| 35 | + |
| 36 | +concurrency: |
| 37 | + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} |
| 38 | + cancel-in-progress: true |
| 39 | + |
| 40 | +permissions: |
| 41 | + contents: read |
| 42 | + |
| 43 | +jobs: |
| 44 | + test: |
| 45 | + strategy: |
| 46 | + matrix: |
| 47 | + dlang: ["ldc-latest", "dmd-latest"] |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v4 |
| 51 | + - uses: dlang-community/setup-dlang@v2 |
| 52 | + with: |
| 53 | + compiler: ${{ matrix.dlang }} |
| 54 | + |
| 55 | + - name: Setup Rust toolchain |
| 56 | + uses: ./.github/actions/setup |
| 57 | + |
| 58 | + - name: Build D binding |
| 59 | + working-directory: bindings/d |
| 60 | + run: dub build |
| 61 | + |
| 62 | + - name: Check diff |
| 63 | + run: git diff --exit-code |
| 64 | + |
| 65 | + - name: Check |
| 66 | + working-directory: bindings/d |
| 67 | + run: dub lint |
| 68 | + |
| 69 | + - name: Run tests |
| 70 | + working-directory: bindings/d |
| 71 | + run: dub test && cd test && dub |
0 commit comments