Skip to content

Merge pull request #542 from ddiss/libfuse3 #150

Merge pull request #542 from ddiss/libfuse3

Merge pull request #542 from ddiss/libfuse3 #150

Workflow file for this run

on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
tests:
runs-on: ${{ matrix.runs_on }}
strategy:
fail-fast: false
matrix:
include:
- displayTargetName: ubuntu-22.04
os: unix
runs_on: ubuntu-22.04
shell: bash
- displayTargetName: kasan
os: unix
runs_on: ubuntu-22.04
shell: bash
build_options: "kasan=yes kasan_test=yes"
- displayTargetName: windows-2019
os: windows
runs_on: windows-2019
shell: msys2 {0}
- displayTargetName: clang-build
os: unix
runs_on: ubuntu-22.04
shell: bash
build_options: "LLVM=1 CROSS_COMPILE=x86_64-linux-gnu"
- displayTargetName: lkl-fuzzers
os: unix
runs_on: ubuntu-22.04
shell: bash
build_options: "LKL_FUZZING=1 fuzzers"
- displayTargetName: zpoline
# maybe integrate with default Linux build once the function becomes stable
os: unix
runs_on: ubuntu-22.04
shell: bash
build_options: "zpoline=./zpoline"
timeout-minutes: 100
env:
CCACHE_DIR: ${{ github.workspace }}/.ccache
USE_CCACHE: 1
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: Set env
shell: bash
run: |
echo "/usr/lib/ccache/bin:/usr/lib/ccache:/mingw64/bin:${{ github.workspace }}/bin" >> $GITHUB_PATH
echo "export PATH=/usr/lib/ccache/bin:/usr/lib/ccache:/mingw64/bin:${{ github.workspace }}/bin:$PATH" >> $HOME/.bashrc
- uses: msys2/setup-msys2@v2
if: runner.os == 'Windows'
with:
msystem: MSYS
path-type: minimal
update: true
install: >-
base-devel
gcc
git
bc
python-pip
dosfstools
mingw-w64-x86_64-ccache
- name: Checkout
if: runner.os == 'Linux'
uses: actions/checkout@v2
- name: Install pip dependencies
run: pip install yamlish junit-xml
- name: Install openvpn
if: runner.os == 'Windows'
shell: pwsh
run: |
curl -L -O https://swupdate.openvpn.org/community/releases/OpenVPN-2.5.3-I601-amd64.msi
$file = "OpenVPN-2.5.3-I601-amd64.msi"
$log = "install.log"
$procMain = Start-Process "msiexec" "/i `"$file`" /qn /l*! `"$log`"" -NoNewWindow -PassThru
$procLog = Start-Process "powershell" "Get-Content -Path `"$log`" -Wait" -NoNewWindow -PassThru
$procMain.WaitForExit()
$procLog.Kill()
- name: Partial Clone
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
REPO="https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
BRANCH="${GITHUB_REF/#refs\/heads\//}"
git init .
git remote add origin $REPO
git config core.sparseCheckout true
echo -e '/*\n!*aux.*' >> .git/info/sparse-checkout
git -c protocol.version=2 fetch --no-tags --prune --progress --depth=10 origin +${GITHUB_SHA}:refs/remotes/origin/${BRANCH}
git checkout --progress --force -B $BRANCH refs/remotes/origin/$BRANCH
- uses: actions/cache@v2
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ runner.os }}-ccache-build-${{ github.sha }}
restore-keys: ${{ runner.os }}-ccache-build-
- name: Install ccache on ubuntu-latest
if: runner.os == 'Linux'
run: |
sudo apt update -y
sudo apt install -y ccache libjsmn-dev
- name: Install clang toolchain
if: runner.os == 'Linux'
run: |
sudo apt update -y
sudo apt install -y clang lld llvm
- name: Install patched binutils for Windows
if: runner.os == 'Windows'
run: |
cp -f tools/lkl/bin/*.exe /usr/bin/
- name: Fix broken msys2 ccache
if: runner.os == 'Windows'
run: |
mkdir -p /usr/lib/ccache/bin
cd /usr/lib/ccache/bin
echo -e '#!/bin/bash\n\nccache /usr/bin/cc "$@"' > cc
echo -e '#!/bin/bash\n\nccache /usr/bin/gcc "$@"' > gcc
echo -e '#!/bin/bash\n\nccache /usr/bin/cpp "$@"' > cpp
export PATH=/usr/lib/ccache/bin:/usr/lib/ccache:/mingw64/bin:$PATH
which gcc
ccache -z
- name: install zpoline
if: matrix.displayTargetName == 'zpoline'
run: |
sudo apt install -y binutils-dev
git clone https://github.com/yasukata/zpoline
cd zpoline
git checkout 022a3b8c7a5c23bfd99162b478bf3eb5f70c07a2
make
cd ..
# This is the whole point of zpoline
echo "==== setting mmap_min_addr ===="
sudo sh -c "echo 0 > /proc/sys/vm/mmap_min_addr"
echo "setting env variable (debug)"
echo "ZPOLINE_DEBUG=0" >> "$GITHUB_ENV"
- name: Build
run: |
make -j4 -C tools/lkl ${{ matrix.build_options }}
- name: Tests
run: mkdir /tmp/junit && make -C tools/lkl run-tests tests="--junit-dir /tmp/junit"
- name: Save test results
uses: actions/upload-artifact@v2
if: success() || failure()
with:
name: test-results-${{ matrix.displayTargetName }}
path: /tmp/junit/*.xml
checkpatch:
runs-on: ubuntu-20.04
name: checkpatch
steps:
- name: Checkout
with:
fetch-depth: 0
uses: actions/checkout@v2
- name: Install pip dependencies
run: sudo pip install ply GitPython
- name: Check coding style
run: tools/lkl/scripts/checkpatch.sh