Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
11b1607
Workflow's for syncing with upstream, build, unit test, and test-runner
jprestwo Mar 16, 2022
b2e6396
workflow: use newer commit for hostapd
jprestwo Jun 24, 2022
ecb631a
ci: remove cache/ from tar file list
jprestwo Sep 7, 2022
9c99e96
ci: use kernel 5.19
jprestwo Sep 14, 2022
7edc70f
ci: use iwd-ci after renaming to remove -v2
jprestwo Oct 14, 2022
4bbfa3d
ci: remove set-output use, now deprecated
jprestwo Oct 14, 2022
0c9e100
Update kernel to 6.2 and hostapd/wpa_s to 2.11
jprestwo Nov 7, 2024
c8a8351
Update upload/download-artifact to v4
jprestwo Feb 13, 2025
d02ca9a
station: always network (temp) blacklist on failure
jprestwo Mar 24, 2025
71d38b7
auto-t: add test for disabling the timeout blacklist
jprestwo Mar 24, 2025
c3701d1
blacklist: include a blacklist reason when adding/finding
jprestwo Mar 24, 2025
baabe90
blacklist: fix pruning to remove the entry if its expired
jprestwo Mar 24, 2025
ce9eda2
blacklist: add BLACKLIST_REASON_TRANSIENT_ERROR
jprestwo Mar 24, 2025
aa0b2e2
network: update to use blacklist's new temporary type
jprestwo Mar 24, 2025
086a75d
blacklist: add new blacklist reason, ROAM_REQUESTED
jprestwo Mar 24, 2025
d17b085
scan: Introduce higher level scan BSS groups
jprestwo Mar 24, 2025
93237bd
station: roam blacklist BSS when a roam is requested
jprestwo Mar 24, 2025
7a5308c
station: roam blacklist AP even mid-roam
jprestwo Mar 24, 2025
1191e86
station: adapt roam scan logic to look at the bss group
jprestwo Mar 24, 2025
2c216aa
auto-t: add tests for AP roam blacklisting
jprestwo Mar 24, 2025
b2460fa
doc: document OptimalSignalThreshold and InitialRoamRequestedTimeout
jprestwo Mar 24, 2025
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
269 changes: 269 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,269 @@
name: IWD CI

#
# The basic flow of the CI is as follows:
#
# 1. Get all inputs, or default values, and set as 'setup' job output
# 2. Find any cached binaries (hostapd, wpa_supplicant, kernel etc)
# 3. Checkout all dependent repositories
# 4. Tar all local files. This is an unfortunate requirement since github jobs
# cannot share local files. Since there are multiple CI's acting on the same
# set of repositories it makes more sense to retain these and re-download
# them for each CI job.
# 5. Run each CI, currently 'main' and 'musl'.
# * 'main' is the default IWD CI which runs all the build steps as well
# as test-runner
# * 'musl' uses an alpine docker image to test the build on musl-libc
#
# Both CI's use the 'iwd-ci' repo which calls into 'ci-docker'. The
# 'ci-docker' action essentially re-implements the native Github docker
# action but allows arbitrary options to be passed in (e.g. privileged or
# mounting non-standard directories)
#

on:
pull_request:
workflow_dispatch:
inputs:
tests:
description: Tests to run (comma separated, no spaces)
default: all
kernel:
description: Kernel version
default: '6.2'
hostapd_version:
description: Hostapd and wpa_supplicant version
default: 'hostapd_2_11'
ell_ref:
description: ELL reference
default: refs/heads/workflow

repository_dispatch:
types: [ell-dispatch]

jobs:
setup:
runs-on: ubuntu-22.04
outputs:
tests: ${{ steps.inputs.outputs.tests }}
kernel: ${{ steps.inputs.outputs.kernel }}
hostapd_version: ${{ steps.inputs.outputs.hostapd_version }}
ell_ref: ${{ steps.inputs.outputs.ell_ref }}
repository: ${{ steps.inputs.outputs.repository }}
ref_branch: ${{ steps.inputs.outputs.ref_branch }}
steps:
#
# This makes CI inputs consistent depending on how the CI was invoked:
# * pull_request trigger won't have any inputs, so these need to be set
# to default values.
# * workflow_dispatch sets all inputs from the user input
# * repository_dispatch sets all inputs based on the JSON payload of
# the request.
#
- name: Setup Inputs
id: inputs
run: |
if [ ${{ github.event_name }} == 'workflow_dispatch' ]
then
TESTS=${{ github.event.inputs.tests }}
KERNEL=${{ github.event.inputs.kernel }}
HOSTAPD_VERSION=${{ github.event.inputs.hostapd_version }}
ELL_REF=${{ github.event.inputs.ell_ref }}
REF="$GITHUB_REF"
REPO="$GITHUB_REPOSITORY"
elif [ ${{ github.event_name }} == 'repository_dispatch' ]
then
TESTS=all
KERNEL=5.19
HOSTAPD_VERSION=09a281e52a25b5461c4b08d261f093181266a554
ELL_REF=${{ github.event.client_payload.ref }}
REF=$ELL_REF
REPO=${{ github.event.client_payload.repo }}
else
TESTS=all
KERNEL=5.19
HOSTAPD_VERSION=09a281e52a25b5461c4b08d261f093181266a554
ELL_REF="refs/heads/workflow"
REF="$GITHUB_REF"
REPO="$GITHUB_REPOSITORY"
fi

#
# Now that the inputs are sorted, set the output of this step to these
# values so future jobs can refer to them.
#
echo "tests=$TESTS" >> $GITHUB_OUTPUT
echo "kernel=$KERNEL" >> $GITHUB_OUTPUT
echo "hostapd_version=$HOSTAPD_VERSION" >> $GITHUB_OUTPUT
echo "ell_ref=$ELL_REF" >> $GITHUB_OUTPUT
echo "repository=$REPO" >> $GITHUB_OUTPUT
echo "ref_branch=$REF" >> $GITHUB_OUTPUT

- name: Cache UML Kernel
id: cache-uml-kernel
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/cache/um-linux-${{ steps.inputs.outputs.kernel }}
key: um-linux-${{ steps.inputs.outputs.kernel }}_ubuntu22

- name: Cache Hostapd
id: cache-hostapd
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/cache/hostapd_${{ steps.inputs.outputs.hostapd_version }}
${{ github.workspace }}/cache/hostapd_cli_${{ steps.inputs.outputs.hostapd_version }}
key: hostapd_${{ steps.inputs.outputs.hostapd_version }}_ssl3

- name: Cache WpaSupplicant
id: cache-wpas
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/cache/wpa_supplicant_${{ steps.inputs.outputs.hostapd_version }}
${{ github.workspace }}/cache/wpa_cli_${{ steps.inputs.outputs.hostapd_version }}
key: wpa_supplicant_${{ steps.inputs.outputs.hostapd_version }}_ssl3

- name: Checkout IWD
uses: actions/checkout@v3
with:
path: iwd
repository: IWDTestBot/iwd
token: ${{ secrets.ACTION_TOKEN }}

- name: Checkout ELL
uses: actions/checkout@v3
with:
path: ell
repository: IWDTestBot/ell
ref: ${{ steps.inputs.outputs.ell_ref }}

- name: Checkout CiBase
uses: actions/checkout@v3
with:
repository: IWDTestBot/cibase
path: cibase

- name: Checkout CI
uses: actions/checkout@v3
with:
repository: IWDTestBot/iwd-ci
path: iwd-ci

- name: Tar files
run: |
FILES="iwd ell cibase iwd-ci"

if [ "${{ steps.cache-uml-kernel.outputs.cache-hit }}" == 'true' ]
then
FILES+=" ${{ github.workspace }}/cache/um-linux-${{ steps.inputs.outputs.kernel }}"
fi

if [ "${{ steps.cache-hostapd.outputs.cache-hit }}" == 'true' ]
then
FILES+=" ${{ github.workspace }}/cache/hostapd_${{ steps.inputs.outputs.hostapd_version }}"
FILES+=" ${{ github.workspace }}/cache/hostapd_cli_${{ steps.inputs.outputs.hostapd_version }}"
fi
if [ "${{ steps.cache-wpas.outputs.cache-hit }}" == 'true' ]
then
FILES+=" ${{ github.workspace }}/cache/wpa_supplicant_${{ steps.inputs.outputs.hostapd_version }}"
FILES+=" ${{ github.workspace }}/cache/wpa_cli_${{ steps.inputs.outputs.hostapd_version }}"
fi

tar -cvf archive.tar $FILES

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: iwd-artifacts
path: |
archive.tar

iwd-alpine-ci:
runs-on: ubuntu-22.04
needs: setup
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: iwd-artifacts

- name: Untar
run: tar -xf archive.tar

- name: Modprobe pkcs8_key_parser
run: |
sudo modprobe pkcs8_key_parser

- name: Alpine CI
uses: IWDTestBot/iwd-ci@master
with:
ref_branch: ${{ needs.setup.outputs.ref_branch }}
repository: ${{ needs.setup.outputs.repository }}
github_token: ${{ secrets.ACTION_TOKEN }}
email_token: ${{ secrets.EMAIL_TOKEN }}
patchwork_token: ${{ secrets.PATCHWORK_TOKEN }}
ci: musl

iwd-ci:
runs-on: ubuntu-22.04
needs: setup
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: iwd-artifacts

- name: Untar
run: tar -xf archive.tar

- name: Cache UML Kernel
id: cache-uml-kernel
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/cache/um-linux-${{ needs.setup.outputs.kernel }}
key: um-linux-${{ needs.setup.outputs.kernel }}_ubuntu22

- name: Cache Hostapd
id: cache-hostapd
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/cache/hostapd_${{ needs.setup.outputs.hostapd_version }}
${{ github.workspace }}/cache/hostapd_cli_${{ needs.setup.outputs.hostapd_version }}
key: hostapd_${{ needs.setup.outputs.hostapd_version }}_ssl3

- name: Cache WpaSupplicant
id: cache-wpas
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/cache/wpa_supplicant_${{ needs.setup.outputs.hostapd_version }}
${{ github.workspace }}/cache/wpa_cli_${{ needs.setup.outputs.hostapd_version }}
key: wpa_supplicant_${{ needs.setup.outputs.hostapd_version }}_ssl3

- name: Modprobe pkcs8_key_parser
run: |
sudo modprobe pkcs8_key_parser
echo ${{ needs.setup.outputs.ref_branch }}
echo ${{ needs.setup.outputs.repository }}

- name: Run CI
uses: IWDTestBot/iwd-ci@master
with:
ref_branch: ${{ needs.setup.outputs.ref_branch }}
repository: ${{ needs.setup.outputs.repository }}
tests: ${{ needs.setup.outputs.tests }}
kernel: ${{ needs.setup.outputs.kernel }}
hostapd_version: ${{ needs.setup.outputs.hostapd_version }}
github_token: ${{ secrets.ACTION_TOKEN }}
email_token: ${{ secrets.EMAIL_TOKEN }}
patchwork_token: ${{ secrets.PATCHWORK_TOKEN }}
ci: main

- name: Upload Logs
if: always()
uses: actions/upload-artifact@v4
with:
name: test-runner-logs
path: ${{ github.workspace }}/log
16 changes: 16 additions & 0 deletions .github/workflows/pw-to-pr-email.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
This is an automated email and please do not reply to this email.

Dear Submitter,

Thank you for submitting the patches to the IWD mailing list.
While preparing the CI tests, the patches you submitted couldn't be applied to the current HEAD of the repository.

----- Output -----
{}

Please resolve the issue and submit the patches again.


---
Regards,
IWDTestBot
14 changes: 14 additions & 0 deletions .github/workflows/pw-to-pr.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"email": {
"enable": true,
"server": "smtp.gmail.com",
"port": 587,
"user": "iwd.ci.bot@gmail.com",
"starttls": true,
"default-to": "prestwoj@gmail.com",
"only-maintainers": false,
"maintainers": [
"prestwoj@gmail.com"
]
}
}
43 changes: 43 additions & 0 deletions .github/workflows/schedule_work.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Sync Upstream
on:
schedule:
- cron: "*/15 * * * *"
workflow_dispatch:

jobs:
repo-sync:
runs-on: ubuntu-latest
steps:

- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0

- name: Manage Repo
uses: IWDTestBot/action-manage-repo@master
with:
src_repo: "https://git.kernel.org/pub/scm/network/wireless/iwd.git"
src_branch: "master"
dest_branch: "master"
workflow_branch: "workflow"
github_token: ${{ secrets.GITHUB_TOKEN }}

create_pr:
needs: repo-sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- name: Patchwork to PR
uses: IWDTestBot/action-patchwork-to-pr@master
with:
pw_key_str: "user"
github_token: ${{ secrets.ACTION_TOKEN }}
email_token: ${{ secrets.EMAIL_TOKEN }}
patchwork_token: ${{ secrets.PATCHWORK_TOKEN }}
config: https://raw.githubusercontent.com/IWDTestBot/iwd/workflow/.github/workflows/pw-to-pr.json
patchwork_id: "408"
email_message: https://raw.githubusercontent.com/IWDTestBot/iwd/workflow/.github/workflows/pw-to-pr-email.txt
2 changes: 1 addition & 1 deletion autotests/testAPRoam/connection_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
class Test(unittest.TestCase):

def validate(self, expect_roam=True):
wd = IWD()
wd = IWD(True)

devices = wd.list_devices(1)
device = devices[0]
Expand Down
2 changes: 2 additions & 0 deletions autotests/testAPRoam/hw.conf
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
[SETUP]
num_radios=4
hwsim_medium=true
start_iwd=false

[HOSTAPD]
rad0=ssid1.conf
Expand Down
6 changes: 6 additions & 0 deletions autotests/testAPRoam/main.conf.roaming
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[General]
RoamThreshold=-66
OptimalSignalThreshold=-72

[Blacklist]
InitialRoamRequestedTimeout=20
Loading
Loading