File: rust.yml

package info (click to toggle)
rust-apr 0.4.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 536 kB
  • sloc: makefile: 2
file content (59 lines) | stat: -rw-r--r-- 2,138 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Rust

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:

    strategy:
      matrix:
        os: [ubuntu-latest, macos-latest, windows-latest]

    runs-on: ${{ matrix.os }}

    steps:
    - uses: actions/checkout@v6
    - name: Install apr
      run: |
        sudo apt -y update
        sudo apt install -y libapr1-dev libaprutil1-dev libutf8proc-dev
      if: "matrix.os == 'ubuntu-latest'"
    - name: Install apr (Mac OS)
      run: |
        brew install apr-util apr pkg-config utf8proc
        echo "$(brew --prefix)/opt/pkg-config/bin" >> $GITHUB_PATH
        echo "PKG_CONFIG_PATH=/opt/homebrew/opt/apr-util/lib/pkgconfig:/opt/homebrew/opt/apr/lib/pkgconfig" >> $GITHUB_ENV
        pkg-config --list-all
      if: "matrix.os == 'macos-latest'"
    - name: Install apr (Windows)
      run: |
        vcpkg install apr:x64-windows apr-util:x64-windows
        $prefix = "$env:VCPKG_INSTALLATION_ROOT\installed\x64-windows"
        echo "SYSTEM_DEPS_APR_1_NO_PKG_CONFIG=1" >> $env:GITHUB_ENV
        echo "SYSTEM_DEPS_APR_1_INCLUDE=$prefix\include" >> $env:GITHUB_ENV
        echo "SYSTEM_DEPS_APR_1_SEARCH_NATIVE=$prefix\lib" >> $env:GITHUB_ENV
        echo "SYSTEM_DEPS_APR_1_LIB=libapr-1" >> $env:GITHUB_ENV
        echo "SYSTEM_DEPS_APR_UTIL_1_NO_PKG_CONFIG=1" >> $env:GITHUB_ENV
        echo "SYSTEM_DEPS_APR_UTIL_1_INCLUDE=$prefix\include" >> $env:GITHUB_ENV
        echo "SYSTEM_DEPS_APR_UTIL_1_SEARCH_NATIVE=$prefix\lib" >> $env:GITHUB_ENV
        echo "SYSTEM_DEPS_APR_UTIL_1_LIB=libaprutil-1" >> $env:GITHUB_ENV
        echo "$prefix\bin" >> $env:GITHUB_PATH
      if: "matrix.os == 'windows-latest'"
    - name: Build
      run: cargo build --verbose
    - name: Run tests
      run: cargo test --verbose
    - name: Run tests with all features
      run: cargo test --all-features --verbose
      if: "matrix.os != 'windows-latest'"
    - name: Build without std (no_std check)
      run: cargo build --no-default-features --verbose
    - name: Test without std (no_std check)
      run: cargo test --no-default-features --verbose