diff --git a/.github/workflows/make.yaml b/.github/workflows/make.yaml index 185863f494..2de018114b 100644 --- a/.github/workflows/make.yaml +++ b/.github/workflows/make.yaml @@ -190,6 +190,200 @@ jobs: [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed" + alpine: + runs-on: ubuntu-latest + + name: Alpine (x86) + + defaults: + run: + # Use emulated shell as default + shell: alpine.sh {0} + + steps: + - name: get CPU information + shell: bash + run: | + cat /proc/cpuinfo + + - name: checkout repository + uses: actions/checkout@v3 + + - name: install dependencies + uses: jirutka/setup-alpine@v1 + with: + # For available CPU architectures, see: + # https://github.com/marketplace/actions/setup-alpine-linux-environment + arch: x86 + # There is currently no package distributed for QScintilla-Qt6. + # qt6-qtbase-dev + # qt6-qt5compat-dev + # qt6-qttools-dev + packages: > + build-base + autoconf + automake + m4 + git + ccache + gfortran + flex + gperf + icoutils + mesa-dri-gallium + libtool + libltdl + rsvg-convert + texlive-dvi + arpack-dev + bison + curl-dev + fftw-dev + fltk-dev + fontconfig-dev + freetype-dev + ghostscript-dev + glpk-dev + glu-dev + gnuplot + graphicsmagick-dev + hdf5-dev + lcms2-dev + libsm-dev + libsndfile-dev + openblas-dev + pcre2-dev + perl + portaudio-dev + qhull-dev + qrupdate-dev + qscintilla-dev + qt5-qtbase-dev + qt5-qttools-dev + qscintilla-dev + rapidjson-dev + readline-dev + suitesparse-dev + texinfo + xvfb-run + xz-dev + zlib-dev + bzip2 + gzip + tar + zip + + - name: prepare ccache + # create key with human readable timestamp + # used in action/cache/restore and action/cache/save steps + id: ccache-prepare + run: | + echo "key=ccache:alpine:x86:${{ github.ref }}:$(date +"%Y-%m-%d_%H-%M-%S"):${{ github.sha }}" >> $GITHUB_OUTPUT + + - name: restore ccache + # setup the github cache used to maintain the ccache from one job to the next + uses: actions/cache/restore@v3 + with: + # location of the ccache of the chroot in the root file system + path: /home/runner/rootfs/alpine-latest-x86/home/runner/.ccache + key: ${{ steps.ccache-prepare.outputs.key }} + restore-keys: | + ccache:alpine:x86:${{ github.ref }} + ccache:alpine:x86:refs/heads/default + + - name: configure ccache + run: | + test -d ~/.ccache || mkdir ~/.ccache + echo "max_size = 2G" >> ~/.ccache/ccache.conf + echo "compression = true" >> ~/.ccache/ccache.conf + ccache -s + + - name: bootstrap + run: GNULIB_URL=https://github.com/coreutils/gnulib.git ./bootstrap + + - name: configure + timeout-minutes: 30 + run: | + echo $PATH + echo which ccache + which ccache + which gcc + echo gcc --version + gcc --version + which g++ + echo g++ --version + g++ --version + which gfortran + echo gfortran --version + gfortran --version + mkdir .build + cd .build && ../configure + + - name: build + run: XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a make -C ./.build all -j2 V=1 + + - name: ccache status + run: ccache -s + + - name: save ccache + # Save the cache after we are done (successfully) building + uses: actions/cache/save@v3 + with: + path: ~/.ccache + key: ${{ steps.ccache-prepare.outputs.key }} + + - name: check + timeout-minutes: 60 + run: XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a make -C ./.build check | tee ./test-suite.log + + - name: display test suite log + continue-on-error: true + # Displaying the log shouldn't take long. Cancel the step if it does. + timeout-minutes: 5 + run: cat ./.build/test/fntests.log + + - name: check with VM + timeout-minutes: 60 + run: | + mv ./.build/test/fntests.log ./.build/test/fntests-no-vm.log + XDG_RUNTIME_DIR=$RUNNER_TEMP xvfb-run -a make -C ./.build check-vm | tee ./test-suite-vm.log + + - name: display test suite log with VM + continue-on-error: true + # Displaying the log shouldn't take long. Cancel the step if it does. + timeout-minutes: 5 + run: cat ./.build/test/fntests.log + + - name: difference between logs with and without VM + continue-on-error: true + run: | + echo "::group::diff test-suite.log" + echo "diff -urN ./test-suite.log ./test-suite-vm.log" + diff -urN ./test-suite.log ./test-suite-vm.log || true + echo "::endgroup::" + echo "::group::diff fntests.log" + echo "diff -urN ./.build/test/fntests-no-vm.log ./.build/test/fntests.log" + diff -urN ./.build/test/fntests-no-vm.log ./.build/test/fntests.log || true + echo "::endgroup::" + + - name: analyze test suite results + # Make sure the test summary lists 0 "FAIL"s and no "REGRESSION" + run: | + [ -n "$(grep -e "FAIL\s*0" ./test-suite.log)" ] || exit 1 + [ -z "$(grep -e "REGRESSION" ./test-suite.log)" ] || exit 1 + [ -n "$(grep -e "FAIL\s*0" ./test-suite-vm.log)" ] || exit 1 + [ -z "$(grep -e "REGRESSION" ./test-suite-vm.log)" ] || exit 1 + echo No unknown failing tests. + + - name: test history file creation + # see bug #62365 + # Pipe to an interactive session to trigger appending the command to + # the history. This will trigger the creation of a history file. + run: | + echo "history_file (make_absolute_filename ('./a/b/c/history')); disp ('test')" | ./.build/run-octave -i + [ -f ./a/b/c/history ] || echo "::warning::Creating history file failed" + + macos: runs-on: ${{ matrix.os }}