gh-actions: make the release tests a matrix build
This commit is contained in:
parent
b0b1c251c0
commit
02e77bdd21
116
.github/workflows/release-test.yml
vendored
116
.github/workflows/release-test.yml
vendored
@ -38,16 +38,38 @@ on:
|
|||||||
env:
|
env:
|
||||||
DOCKER_MAKE_ARGS: -j
|
DOCKER_MAKE_ARGS: -j
|
||||||
# split up native and IoT-LAB tasks to parallelize somewhat and prevent
|
# split up native and IoT-LAB tasks to parallelize somewhat and prevent
|
||||||
# to hit Github Limit of 6h per job, can't use matrix because there seems to be
|
# to hit Github Limit of 6h per job.
|
||||||
# some sync happening and the longer running job is killed.
|
|
||||||
jobs:
|
jobs:
|
||||||
native-tasks:
|
tasks:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 360
|
timeout-minutes: 360
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
pytest_mark:
|
||||||
|
- "iotlab_creds"
|
||||||
|
include:
|
||||||
|
- pytest_mark: "not iotlab_creds"
|
||||||
|
sudo: "sudo"
|
||||||
steps:
|
steps:
|
||||||
- name: Generate .riotgithubtoken
|
- name: Generate .riotgithubtoken
|
||||||
run: |
|
run: |
|
||||||
echo '${{ secrets.RIOT_CI_ACCESS_TOKEN }}' > ~/.riotgithubtoken
|
echo '${{ secrets.RIOT_CI_ACCESS_TOKEN }}' > ~/.riotgithubtoken
|
||||||
|
- name: Setup IoT-LAB credentials
|
||||||
|
if: ${{ matrix.pytest_mark == 'iotlab_creds' }}
|
||||||
|
run: |
|
||||||
|
echo '${{ secrets.IOTLABRC }}' > ~/.iotlabrc
|
||||||
|
- name: Setup SSH agent
|
||||||
|
if: ${{ matrix.pytest_mark == 'iotlab_creds' }}
|
||||||
|
uses: webfactory/ssh-agent@v0.4.1
|
||||||
|
with:
|
||||||
|
ssh-private-key: ${{ secrets.IOTLAB_PRIVATE_KEY }}
|
||||||
|
- name: Fetch host key from IoT-LAB saclay site
|
||||||
|
if: ${{ matrix.pytest_mark == 'iotlab_creds' }}
|
||||||
|
run: |
|
||||||
|
IOTLAB_USER=$(cat ~/.iotlabrc | cut -f1 -d:)
|
||||||
|
ssh -oStrictHostKeyChecking=accept-new \
|
||||||
|
${IOTLAB_USER}@saclay.iot-lab.info exit
|
||||||
- name: Checkout Release-Specs
|
- name: Checkout Release-Specs
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
@ -93,7 +115,7 @@ jobs:
|
|||||||
cd Release-Specs
|
cd Release-Specs
|
||||||
# definition in env does not work since $GITHUB_WORKSPACE seems not to
|
# definition in env does not work since $GITHUB_WORKSPACE seems not to
|
||||||
# be accessible
|
# be accessible
|
||||||
sudo \
|
${{ matrix.sudo }} \
|
||||||
BUILD_IN_DOCKER=1 \
|
BUILD_IN_DOCKER=1 \
|
||||||
DOCKER_MAKE_ARGS=${DOCKER_MAKE_ARGS} \
|
DOCKER_MAKE_ARGS=${DOCKER_MAKE_ARGS} \
|
||||||
DOCKER_ENV_VARS=USEMODULE \
|
DOCKER_ENV_VARS=USEMODULE \
|
||||||
@ -101,7 +123,7 @@ jobs:
|
|||||||
GITHUB_RUN_ID=${GITHUB_RUN_ID} \
|
GITHUB_RUN_ID=${GITHUB_RUN_ID} \
|
||||||
GITHUB_SERVER_URL=${GITHUB_SERVER_URL} \
|
GITHUB_SERVER_URL=${GITHUB_SERVER_URL} \
|
||||||
RIOTBASE=${RIOTBASE} \
|
RIOTBASE=${RIOTBASE} \
|
||||||
$(which tox) -- ${TOX_ARGS} -m "not iotlab_creds"
|
$(which tox) -- ${TOX_ARGS} -m "${{ matrix.pytest_mark }}"
|
||||||
- name: junit2html and XML deploy
|
- name: junit2html and XML deploy
|
||||||
if: always()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
@ -122,87 +144,3 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: Test Reports
|
name: Test Reports
|
||||||
path: test-reports/*
|
path: test-reports/*
|
||||||
iotlab-tasks:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
timeout-minutes: 360
|
|
||||||
steps:
|
|
||||||
- name: Generate .riotgithubtoken
|
|
||||||
run: |
|
|
||||||
echo '${{ secrets.RIOT_CI_ACCESS_TOKEN }}' > ~/.riotgithubtoken
|
|
||||||
- name: Checkout Release-Specs
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: RIOT-OS/Release-Specs
|
|
||||||
path: Release-Specs
|
|
||||||
fetch-depth: 1
|
|
||||||
ref: ${{ github.event.inputs.release_specs_version }}
|
|
||||||
- name: Checkout RIOT
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
repository: RIOT-OS/RIOT
|
|
||||||
path: RIOT
|
|
||||||
fetch-depth: 1
|
|
||||||
ref: ${{ github.event.inputs.riot_version }}
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v2
|
|
||||||
with:
|
|
||||||
python-version: 3.x
|
|
||||||
- name: Install Python dependencies
|
|
||||||
run: |
|
|
||||||
python -m pip install --upgrade pip
|
|
||||||
python -m pip install tox junit2html
|
|
||||||
- name: Pull riotbuild docker image
|
|
||||||
run: |
|
|
||||||
DOCKER_VERSION="${{ github.event.inputs.docker_version }}"
|
|
||||||
if [ -z "$DOCKER_VERSION" ]; then
|
|
||||||
DOCKER_VERSION="latest"
|
|
||||||
fi
|
|
||||||
docker pull riot/riotbuild:$DOCKER_VERSION
|
|
||||||
- name: Setup IoT-LAB credentials
|
|
||||||
run: |
|
|
||||||
echo '${{ secrets.IOTLABRC }}' > ~/.iotlabrc
|
|
||||||
- name: Setup SSH agent
|
|
||||||
uses: webfactory/ssh-agent@v0.4.1
|
|
||||||
with:
|
|
||||||
ssh-private-key: ${{ secrets.IOTLAB_PRIVATE_KEY }}
|
|
||||||
- name: Fetch host key from IoT-LAB saclay site
|
|
||||||
run: |
|
|
||||||
IOTLAB_USER=$(cat ~/.iotlabrc | cut -f1 -d:)
|
|
||||||
ssh -oStrictHostKeyChecking=accept-new \
|
|
||||||
${IOTLAB_USER}@saclay.iot-lab.info exit
|
|
||||||
- name: Run release tests
|
|
||||||
timeout-minutes: 350
|
|
||||||
run: |
|
|
||||||
# definition in env does not work since $GITHUB_WORKSPACE seems not to
|
|
||||||
# be accessible
|
|
||||||
export RIOTBASE="$GITHUB_WORKSPACE/RIOT"
|
|
||||||
TOX_ARGS=""
|
|
||||||
if ! echo ${{ github.event.inputs.riot_version }} | \
|
|
||||||
grep -q "[0-9]\{4\}.[0-9]\{2\}-RC[0-9]\+"; then
|
|
||||||
TOX_ARGS+="--non-RC "
|
|
||||||
fi
|
|
||||||
|
|
||||||
cd Release-Specs
|
|
||||||
BUILD_IN_DOCKER=1 \
|
|
||||||
DOCKER_ENV_VARS=USEMODULE \
|
|
||||||
$(which tox) -- ${TOX_ARGS} -m "iotlab_creds"
|
|
||||||
- name: junit2html and XML deploy
|
|
||||||
if: always()
|
|
||||||
run: |
|
|
||||||
DATE=$(date +"%Y-%m-%d-%H-%M-%S")
|
|
||||||
if echo ${{ github.event.inputs.riot_version }} | \
|
|
||||||
grep -q "[0-9]\{4\}.[0-9]\{2\}"; then
|
|
||||||
VER=${{ github.event.inputs.riot_version }}
|
|
||||||
else
|
|
||||||
VER=$(git -C $GITHUB_WORKSPACE/RIOT rev-parse --short HEAD)
|
|
||||||
fi
|
|
||||||
mkdir test-reports/
|
|
||||||
junit2html $GITHUB_WORKSPACE/Release-Specs/test-report.xml \
|
|
||||||
test-reports/test-report-iotlab-$VER-$DATE.html
|
|
||||||
cp $GITHUB_WORKSPACE/Release-Specs/test-report.xml \
|
|
||||||
test-reports/test-report-iotlab-$VER-$DATE.xml
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: Test Reports
|
|
||||||
path: test-reports/*
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user