Merge pull request #184 from nekopsykose/endian #375
This file contains 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
name: Test | |
on: [push, pull_request] | |
permissions: | |
actions: read | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: "Build" | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: sudo ./hacking/installdeps.sh | |
- name: Configure | |
run: ./autogen.sh && ./configure --prefix=/usr --sysconfdir=/etc --libdir=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH) CFLAGS='-Wall -Werror' | |
- name: Build | |
run: make -j $(nproc) CFLAGS='-fsanitize=address -fsanitize=undefined' | |
- name: Unit tests | |
run: make check | |
- name: Capture build | |
run: make install DESTDIR=$(pwd)/instroot && tar -C instroot -czf composefs.tar . | |
- name: Upload binary | |
uses: actions/upload-artifact@v2 | |
with: | |
name: composefs.tar | |
path: composefs.tar | |
build-unit-cross: | |
runs-on: ubuntu-latest | |
name: Build on ${{ matrix.arch }} | |
strategy: | |
matrix: | |
include: | |
- arch: armv7 | |
distro: ubuntu_latest | |
- arch: aarch64 | |
distro: ubuntu_latest | |
- arch: s390x | |
distro: ubuntu_latest | |
- arch: ppc64le | |
distro: ubuntu_latest | |
steps: | |
- uses: actions/[email protected] | |
with: | |
submodules: true | |
set-safe-directory: true | |
- uses: uraimo/[email protected] | |
name: Build | |
id: build | |
with: | |
arch: ${{ matrix.arch }} | |
distro: ${{ matrix.distro }} | |
githubToken: ${{ github.token }} | |
run: | | |
apt-get update -y | |
./hacking/installdeps.sh | |
./autogen.sh | |
./configure CFLAGS='-Wall -Werror' | |
make -j $(nproc) | |
make check | |
integration: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- run: sudo apt-get update -y | |
- name: Install erofs kmod | |
run: sudo apt install linux-modules-extra-$(uname -r) | |
- name: Install sanitizer dependencies | |
run: sudo apt install libasan6 libubsan1 | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Download | |
uses: actions/download-artifact@v2 | |
with: | |
name: composefs.tar | |
- run: sudo tar -C / -xvf composefs.tar | |
- name: Integration tests | |
run: sudo ./tests/integration.sh | |
clang-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v2 | |
- name: install dependencies | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install -y make clang-format | |
- name: check formatting | |
run: | | |
sudo docker build -t clang-format hacking/clang-format | |
sudo docker run --rm -w /src -v ${PWD}:/src clang-format |