| # SPDX-License-Identifier: MPL-2.0 | |
| # | |
| # libpathrs: safe path resolution on Linux | |
| # Copyright (C) 2019-2025 SUSE LLC | |
| # Copyright (C) 2026 Aleksa Sarai <cyphar@cyphar.com> | |
| # | |
| # This Source Code Form is subject to the terms of the Mozilla Public | |
| # License, v. 2.0. If a copy of the MPL was not distributed with this | |
| # file, You can obtain one at https://mozilla.org/MPL/2.0/. | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main ] | |
| release: | |
| types: [ published ] | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: | |
| name: bindings-c | |
| permissions: | |
| contents: read | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| smoke-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| # Build and install libpathrs.so. | |
| - name: install rust toolchain | |
| run: |- | |
| rustup toolchain install --profile minimal --no-self-update stable | |
| rustup default stable | |
| - name: build libpathrs | |
| run: make release | |
| - name: install libpathrs | |
| run: sudo ./install.sh --libdir=/usr/lib | |
| # Run smoke-tests. | |
| - run: make -C examples/c smoke-test | |
| c-complete: | |
| needs: | |
| - smoke-test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - run: echo "C CI jobs completed successfully." |