|
| 1 | +name: autotools-freebsd |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [ |
| 6 | +# "master", "devel", |
| 7 | +# "citest", |
| 8 | +# "citest-autotools", |
| 9 | + "citest-autotools-freebsd" ] |
| 10 | + tags: |
| 11 | + - '**' |
| 12 | + pull_request: |
| 13 | + branches: [ "master", "devel" ] |
| 14 | + |
| 15 | +jobs: |
| 16 | + build: |
| 17 | + runs-on: ubuntu-latest |
| 18 | + steps: |
| 19 | + - uses: actions/checkout@v4 |
| 20 | + - name: Start FreeBSD VM |
| 21 | + id: freebsdvm |
| 22 | + uses: vmactions/freebsd-vm@v1 |
| 23 | + with: |
| 24 | + usesh: true |
| 25 | + sync: nfs |
| 26 | + prepare: | |
| 27 | + pkg update |
| 28 | + pkg install -y check autoconf automake libtool |
| 29 | + run: | |
| 30 | + pwd |
| 31 | + ls -lah |
| 32 | + whoami |
| 33 | + env |
| 34 | + freebsd-version |
| 35 | + sysctl hw.model |
| 36 | + sysctl hw.ncpu |
| 37 | + sysctl hw.physmem |
| 38 | + sysctl hw.usermem |
| 39 | +# - name: install prereq. |
| 40 | +# shell: freebsd {0} |
| 41 | +# run: sudo pkg update ; sudo pkg install -y check |
| 42 | + - name: debug env |
| 43 | + shell: freebsd {0} |
| 44 | + run: | |
| 45 | + cd $GITHUB_WORKSPACE; pwd; ls -la |
| 46 | + - name: autogen |
| 47 | + shell: freebsd {0} |
| 48 | + run: | |
| 49 | + cd $GITHUB_WORKSPACE; ./autogen.sh |
| 50 | + - name: configure |
| 51 | + shell: freebsd {0} |
| 52 | + run: | |
| 53 | + cd $GITHUB_WORKSPACE; ./configure |
| 54 | + - name: make |
| 55 | + shell: freebsd {0} |
| 56 | + run: | |
| 57 | + cd $GITHUB_WORKSPACE; make |
| 58 | + - name: make check |
| 59 | + shell: freebsd {0} |
| 60 | + run: | |
| 61 | + cd $GITHUB_WORKSPACE; make check |
| 62 | + - name: make distcheck |
| 63 | + shell: freebsd {0} |
| 64 | + run: | |
| 65 | + cd $GITHUB_WORKSPACE; make distcheck |
| 66 | + - name: make install |
| 67 | + shell: freebsd {0} |
| 68 | + run: | |
| 69 | + cd $GITHUB_WORKSPACE; sudo make install |
| 70 | + - name: check installation |
| 71 | + shell: freebsd {0} |
| 72 | + run: | |
| 73 | + cd $GITHUB_WORKSPACE; find /usr/local -iname '*adf*' |
| 74 | + - name: update ldconfig |
| 75 | + shell: freebsd {0} |
| 76 | + run: | |
| 77 | + cd $GITHUB_WORKSPACE; sudo ldconfig |
| 78 | + - name: test installed command-line utils |
| 79 | + shell: freebsd {0} |
| 80 | + run: | |
| 81 | + cd $GITHUB_WORKSPACE; ./tests/examples/test_all_examples.sh /usr/local/bin |
| 82 | + - name: test installed command-line utils (2) |
| 83 | + shell: freebsd {0} |
| 84 | + run: | |
| 85 | + cd $GITHUB_WORKSPACE; cat tests/config.sh.in_cmake | \ |
| 86 | + sed -e 's@\${PROJECT_BINARY_DIR}@'"$GITHUB_WORKSPACE"'@' \ |
| 87 | + -e 's@\${PROJECT_SOURCE_DIR}@'"$GITHUB_WORKSPACE"'@' \ |
| 88 | + > tests/config.sh |
| 89 | + cd $GITHUB_WORKSPACE; cat tests/config.sh |
| 90 | + ./tests/examples2/run_all_tests.sh /usr/local/bin |
| 91 | + - name: store logs from failed tests |
| 92 | + if: failure() |
| 93 | + uses: actions/upload-artifact@v4 |
| 94 | + with: |
| 95 | + name: freebsd_autotools_logs_failed_tests |
| 96 | + path: | |
| 97 | + configure |
| 98 | + tests/*.log |
| 99 | + tests/examples/*.log |
| 100 | + tests/examples2/*.log |
| 101 | + tests/regr/*.log |
| 102 | + tests/unit/*.log |
0 commit comments