|
| 1 | +# |
| 2 | +# build.yml - GitHub build action for libserialport adapted from AVRDUDE |
| 3 | +# Copyright (C) 2021 Marius Greuel |
| 4 | +# Copyright (C) 2024 Hans Ulrich Niedermann |
| 5 | +# |
| 6 | +# This program is free software; you can redistribute it and/or modify |
| 7 | +# it under the terms of the GNU General Public License as published by |
| 8 | +# the Free Software Foundation; either version 2 of the License, or |
| 9 | +# (at your option) any later version. |
| 10 | +# |
| 11 | +# This program is distributed in the hope that it will be useful, |
| 12 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | +# GNU General Public License for more details. |
| 15 | +# |
| 16 | +# You should have received a copy of the GNU General Public License |
| 17 | +# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 18 | +# |
| 19 | + |
| 20 | +name: Build |
| 21 | + |
| 22 | +on: |
| 23 | + push: |
| 24 | + branches-ignore: |
| 25 | + - 'onlinedocs' |
| 26 | + pull_request: |
| 27 | + branches-ignore: |
| 28 | + - 'onlinedocs' |
| 29 | + workflow_call: |
| 30 | + |
| 31 | +jobs: |
| 32 | + linux-x86_64-autotools: |
| 33 | + runs-on: ubuntu-latest |
| 34 | + steps: |
| 35 | + - uses: actions/checkout@v3 |
| 36 | + - name: Install prerequisites |
| 37 | + run: >- |
| 38 | + sudo apt-get update |
| 39 | +
|
| 40 | + sudo apt-get install -y |
| 41 | + build-essential |
| 42 | + automake |
| 43 | + libtool |
| 44 | + - name: Configure |
| 45 | + run: >- |
| 46 | + ./autogen.sh |
| 47 | +
|
| 48 | + mkdir _atbuild && cd _atbuild |
| 49 | +
|
| 50 | + ../configure |
| 51 | + --prefix=$PWD/../_amprefix |
| 52 | + - name: Build |
| 53 | + run: make -C _atbuild -j$(nproc) |
| 54 | + - name: Install |
| 55 | + run: sudo make -C _atbuild install |
| 56 | + - name: distcheck |
| 57 | + run: make -C _atbuild -j$(nproc) distcheck |
| 58 | + - name: List installed files |
| 59 | + run: find _amprefix | env LC_ALL=C sort |
| 60 | + |
| 61 | + linux-x86_64-cmake: |
| 62 | + runs-on: ubuntu-latest |
| 63 | + steps: |
| 64 | + - uses: actions/checkout@v3 |
| 65 | + - name: Install prerequisites |
| 66 | + run: >- |
| 67 | + sudo apt-get update |
| 68 | +
|
| 69 | + sudo apt-get install -y |
| 70 | + build-essential |
| 71 | + cmake -D CMAKE_INSTALL_PREFIX:PATH=$PWD/_cmprefix |
| 72 | + - name: Configure |
| 73 | + run: >- |
| 74 | + cmake |
| 75 | + -B build |
| 76 | + - name: Build |
| 77 | + run: cmake --build build |
| 78 | + - name: Install |
| 79 | + run: sudo cmake --build build --target install |
| 80 | + - name: List installed files |
| 81 | + run: find _cmprefix | env LC_ALL=C sort |
0 commit comments