|
| 1 | +name: Extensions |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + |
| 6 | +jobs: |
| 7 | + build_extensions: |
| 8 | + strategy: |
| 9 | + matrix: |
| 10 | + extension: |
| 11 | + # Python extensions |
| 12 | + - rcs_xarm7 |
| 13 | + - rcs_realsense |
| 14 | + - rcs_robotiq |
| 15 | + - rcs_tacto |
| 16 | + - rcs_usb_cam |
| 17 | + - rcs_zed |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + - name: Cache apt packages |
| 22 | + uses: actions/cache@v4 |
| 23 | + with: |
| 24 | + path: /var/cache/apt/archives |
| 25 | + key: ${{ runner.os }}-apt-${{ hashFiles('debian_deps.txt') }} |
| 26 | + restore-keys: | |
| 27 | + ${{ runner.os }}-apt- |
| 28 | + - name: Install dependencies |
| 29 | + run: sudo apt install $(cat debian_deps.txt) |
| 30 | + - name: Set up Python 3.11 |
| 31 | + id: setup-python |
| 32 | + uses: actions/setup-python@v5 |
| 33 | + with: |
| 34 | + python-version: "3.11" |
| 35 | + cache: "pip" |
| 36 | + |
| 37 | + - name: Install build dependencies |
| 38 | + run: pip install -r requirements.txt |
| 39 | + |
| 40 | + - name: Install rcs |
| 41 | + run: pip install -v --no-build-isolation . |
| 42 | + |
| 43 | + - name: Install extension |
| 44 | + run: pip install -v --no-build-isolation extensions/${{ matrix.extension }} |
| 45 | + |
| 46 | + build_cpp_extensions_clang: |
| 47 | + strategy: |
| 48 | + matrix: |
| 49 | + extension: |
| 50 | + - rcs_fr3 |
| 51 | + - rcs_panda |
| 52 | + - rcs_robotics_library |
| 53 | + - rcs_so101 |
| 54 | + runs-on: ubuntu-latest |
| 55 | + steps: |
| 56 | + - uses: actions/checkout@v4 |
| 57 | + - name: Cache apt packages |
| 58 | + uses: actions/cache@v4 |
| 59 | + with: |
| 60 | + path: /var/cache/apt/archives |
| 61 | + key: ${{ runner.os }}-apt-${{ hashFiles('debian_deps.txt') }} |
| 62 | + restore-keys: | |
| 63 | + ${{ runner.os }}-apt- |
| 64 | + - name: Install dependencies |
| 65 | + run: sudo apt install $(cat debian_deps.txt) |
| 66 | + - name: Set up Python 3.11 |
| 67 | + id: setup-python |
| 68 | + uses: actions/setup-python@v5 |
| 69 | + with: |
| 70 | + python-version: "3.11" |
| 71 | + cache: "pip" |
| 72 | + - name: Install Python dependencies |
| 73 | + run: | |
| 74 | + pip install -r requirements.txt |
| 75 | + - name: Check clang format |
| 76 | + run: make -C extensions/${{ matrix.extension }} cppcheckformat |
| 77 | + - name: Clang Tidy |
| 78 | + run: make -C extensions/${{ matrix.extension }} cpplint |
| 79 | + - name: Clang build |
| 80 | + run: make -C extensions/${{ matrix.extension }} clangcompile PYTHON_EXECUTABLE=${{ steps.setup-python.outputs.python-path }} |
| 81 | + |
| 82 | + build_cpp_extensions_gcc: |
| 83 | + strategy: |
| 84 | + matrix: |
| 85 | + extension: |
| 86 | + - rcs_fr3 |
| 87 | + - rcs_panda |
| 88 | + - rcs_robotics_library |
| 89 | + - rcs_so101 |
| 90 | + runs-on: ubuntu-latest |
| 91 | + steps: |
| 92 | + - uses: actions/checkout@v4 |
| 93 | + - name: Cache apt packages |
| 94 | + uses: actions/cache@v4 |
| 95 | + with: |
| 96 | + path: /var/cache/apt/archives |
| 97 | + key: ${{ runner.os }}-apt-${{ hashFiles('debian_deps.txt') }} |
| 98 | + restore-keys: | |
| 99 | + ${{ runner.os }}-apt- |
| 100 | + - name: Install dependencies |
| 101 | + run: sudo apt install $(cat debian_deps.txt) |
| 102 | + - name: Set up Python 3.11 |
| 103 | + id: setup-python |
| 104 | + uses: actions/setup-python@v5 |
| 105 | + with: |
| 106 | + python-version: "3.11" |
| 107 | + cache: "pip" |
| 108 | + - name: Install Python dependencies |
| 109 | + run: | |
| 110 | + pip install -r requirements.txt |
| 111 | + pip install -v --no-build-isolation . |
| 112 | + pip install -v --no-build-isolation extensions/${{ matrix.extension }} |
| 113 | + - name: GCC build |
| 114 | + run: make -C extensions/${{ matrix.extension }} gcccompile PYTHON_EXECUTABLE=${{ steps.setup-python.outputs.python-path }} |
| 115 | + - name: Check that stub files are up-to-date |
| 116 | + run: make -C extensions/${{ matrix.extension }} stubgen && git diff --exit-code |
| 117 | + |
0 commit comments