Test function installation #210
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
# MIT License | |
# | |
# Copyright (c) 2022 David Schall and EASE Lab | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# | |
# The above copyright notice and this permission notice shall be included in all | |
# copies or substantial portions of the Software. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | |
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | |
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | |
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | |
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | |
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | |
# SOFTWARE. | |
name: Test function installation | |
on: | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
schedule: | |
- cron: "0 7 * * 1" | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
name: Test download | |
# Building the kernel works also on the github runners. | |
runs-on: ${{ matrix.host-os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: [ amd64 ] | |
os-version: [ focal ] | |
host-os: [ ubuntu-20.04, ubuntu-22.04 ] | |
env: | |
WORKING_DIR: wkdir/ | |
RESOURCES: resources/ | |
VERSION: latest | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
### Setup working environment #### | |
- name: Set up Python version | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
cache: 'pip' # caching pip dependencies | |
- name: Set up python dependencies | |
run: pip install -r ./setup/requirements.txt | |
- name: Set Qemu dependencies | |
run: | | |
make -f ./setup/disk.Makefile dep_install | |
- name: Download Artifacts | |
shell: bash | |
run: | | |
python ./resources/artifacts.py \ | |
--version $VERSION | |
## Test the function installation as described | |
## in the quick start guide | |
- name: Build the working directory | |
shell: bash | |
run: | | |
make -f ./simulation/Makefile build-wkdir | |
- name: Pull, and test the function containers | |
shell: bash | |
timeout-minutes: 15 | |
env: | |
CPU: max | |
run: | | |
make -f ./simulation/Makefile install_functions | |
- name: Verify a successful installation | |
shell: bash | |
run: | | |
make -f ./simulation/Makefile install_check |