Skip to content
This repository was archived by the owner on Jun 3, 2022. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Inspired by https://github.com/rust-analyzer/rust-analyzer/blob/master/.github/workflows/ci.yaml
# but tweaked in several ways. If you make changes here, consider doing so across other
# repositories in e.g. ostreedev etc.
name: CI

permissions:
actions: read

on:
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install deps
run: sudo ./ci/installdeps.sh
- name: Build
run: make -C /usr/src/linux modules M=$PWD
- name: Upload binary
uses: actions/upload-artifact@v2
with:
path: ostreefs.ko
if-no-files-found: error
integration:
name: "Integration"
needs: build
runs-on: ubuntu-latest
steps:
- name: Download
uses: actions/download-artifact@v3
with:
name: ostreefs.ko
- name: Run tests
run: sudo ci/tests.sh
16 changes: 16 additions & 0 deletions ci/installdeps.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash
set -xeuo pipefail
apt update -y
apt install -y linux-source flex bison openssl{,-dev}
cd /usr/src
src=$(ls /usr/src/linux-source*.tar*)
bn=$(basename ${src})
d=${bn%.tar*}
if test '!' -d linux; then
tar xf "${src}"
cd "${d}"
make olddefconfig
make modules_prepare
cd -
mv ${d} linux
fi
3 changes: 3 additions & 0 deletions ci/tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
set -xeuo pipefail
insmod ostreefs.ko