CI #893
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # SPDX-License-Identifier: 0BSD | |
| ############################################################################# | |
| # | |
| # Author: Jia Tan | |
| # | |
| ############################################################################# | |
| name: CI | |
| on: | |
| # Triggers the workflow on push or pull request events but only for the master branch | |
| push: | |
| branches: [ master ] | |
| pull_request: | |
| branches: [ master ] | |
| # Allows running workflow manually | |
| workflow_dispatch: | |
| permissions: {} | |
| jobs: | |
| POSIX: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-24.04-arm] | |
| build_system: [autotools, cmake] | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| ######################## | |
| # Install Dependencies # | |
| ######################## | |
| # Install Autotools on Linux | |
| - name: Install Dependencies | |
| if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'autotools' }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y autoconf automake build-essential po4a autopoint doxygen musl-tools valgrind | |
| - name: Install Dependencies | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }} | |
| run: | | |
| sudo apt-get install -y gcc-multilib | |
| # Install Autotools on Mac | |
| - name: Install Dependencies | |
| if: ${{ matrix.os == 'macos-latest' && matrix.build_system == 'autotools' }} | |
| run: brew install autoconf automake libtool po4a doxygen | |
| # Install CMake on Linux | |
| - name: Install Dependencies | |
| if: ${{ startsWith(matrix.os, 'ubuntu') && matrix.build_system == 'cmake' }} | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y build-essential cmake gettext doxygen musl-tools | |
| # Install CMake on Mac | |
| - name: Install Dependencies | |
| if: ${{ matrix.os == 'macos-latest' && matrix.build_system == 'cmake' }} | |
| run: brew install cmake gettext doxygen | |
| ################## | |
| # Build and Test # | |
| ################## | |
| # -b specifies the build system to use. | |
| # -p specifies the phase (build or test) to help narrow down an error | |
| # if one occurs. | |
| # | |
| # The first two builds/tests are only run on Autotools Linux and | |
| # affect the CFLAGS. Resetting the CFLAGS requires clearing the | |
| # config cache between runs, so the tests that require CFLAGS are | |
| # done first. | |
| - name: Build 32-bit | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }} | |
| run: ./build-aux/ci_build.bash -b autotools -p build -m "gcc -m32" | |
| - name: Test 32-bit | |
| if: ${{ matrix.os == 'ubuntu-latest' && matrix.build_system == 'autotools' }} | |
| run: | | |
| ./build-aux/ci_build.bash -b autotools -p test -m "gcc -m32" -n 32_bit | |
| cd ../xz_build && make distclean | |
| - name: Build with full features | |
| run: ./build-aux/ci_build.bash -b ${{ matrix.build_system }} -p build -f "-march=armv8-a" | |
| - name: Test with full features | |
| run: ./build-aux/ci_build.bash -b ${{ matrix.build_system }} -p test -n full_features | |
| # Attempt to upload the test logs as artifacts if any step has failed | |
| - uses: actions/upload-artifact@v4 | |
| if: ${{ failure() }} | |
| with: | |
| name: ${{ matrix.os }} ${{ matrix.build_system }} Test Logs | |
| path: build-aux/artifacts |