Timer: common time conversion #3113
Workflow file for this run
This file contains hidden or 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
| # Copyright 2024, UNSW | |
| # | |
| # SPDX-License-Identifier: BSD-2-Clause | |
| # Build and test example code | |
| name: Examples | |
| on: | |
| pull_request: | |
| types: [opened, labeled, synchronize] | |
| push: | |
| branches: [ "main" ] | |
| schedule: | |
| # 19.37 AEST on a Thursday weekly | |
| # i.e. 07.37 UTC on Thursday weekly. | |
| # This is a random time as GitHub suggests non-hour-aligned times as their | |
| # runners are busier at that time, and it has been scheduled to avoid | |
| # conflicts with humans trying to use the boards. | |
| - cron: '37 7 * * 4' | |
| env: | |
| MICROKIT_VERSION: 2.2.0 | |
| MICROKIT_URL: https://github.com/seL4/microkit/releases/download/2.2.0/ | |
| SDFGEN_VERSION: 0.29.0 | |
| ZIG_VERSION: 0.15.1 | |
| jobs: | |
| build_linux_x86_64: | |
| name: Build (Linux x86-64) | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Download Microkit SDK | |
| run: | | |
| wget ${{ env.MICROKIT_URL }}/microkit-sdk-${{ env.MICROKIT_VERSION }}-linux-x86-64.tar.gz | |
| tar xf microkit-sdk-${{ env.MICROKIT_VERSION }}-linux-x86-64.tar.gz | |
| - name: Install dependencies (via apt) | |
| run: sudo apt update && sudo apt install -y make llvm lld imagemagick device-tree-compiler | |
| - name: Install Zig | |
| uses: mlugg/setup-zig@v2.2.1 | |
| with: | |
| version: ${{ env.ZIG_VERSION }} | |
| - name: Setup pyenv | |
| run: | | |
| python3 -m venv venv | |
| ./venv/bin/pip install --upgrade sdfgen==${{ env.SDFGEN_VERSION }} | |
| - name: Setup systems-ci | |
| uses: au-ts/systems-ci@main | |
| with: | |
| path: systems-ci | |
| - name: Build examples | |
| run: ./ci/build.py ${PWD}/microkit-sdk-${{ env.MICROKIT_VERSION }} $(nproc) | |
| shell: bash | |
| env: | |
| PYTHON: ${{ github.workspace }}/venv/bin/python | |
| build_linux_x86_64_nix: | |
| name: Build (Linux x86-64 Nix) | |
| runs-on: [self-hosted, Linux, X64] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup systems-ci | |
| uses: au-ts/systems-ci@main | |
| with: | |
| path: systems-ci | |
| - name: Setup Nix | |
| uses: cachix/install-nix-action@v27 | |
| - name: Get Nix dependencies | |
| run: nix develop -c bash -c 'echo Hello World' | |
| - name: Build examples | |
| run: nix develop --ignore-environment -c bash -c 'source systems-ci/setup.sh && CI=1 ./ci/build.py $MICROKIT_SDK $(nproc)' | |
| - name: Archive image artifacts | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: loader-images | |
| path: | | |
| ci_build/**/loader.img | |
| ci_build/**/sel4_32.elf | |
| if-no-files-found: error | |
| build_macos_arm64_nix: | |
| name: Build (macOS ARM64 Nix) | |
| runs-on: [self-hosted, macos, ARM64] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Setup systems-ci | |
| uses: au-ts/systems-ci@main | |
| with: | |
| path: systems-ci | |
| - name: Get Nix dependencies | |
| run: nix develop -c bash -c 'echo Hello World' | |
| - name: Build examples | |
| run: nix develop --ignore-environment -c bash -c 'source systems-ci/setup.sh && CI=1 ./ci/build.py $MICROKIT_SDK $(nproc)' | |
| build_macos_arm64: | |
| name: Build (macOS ARM64) | |
| runs-on: macos-14 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v6 | |
| - name: Download Microkit SDK | |
| run: | | |
| wget ${{ env.MICROKIT_URL }}/microkit-sdk-${{ env.MICROKIT_VERSION }}-macos-aarch64.tar.gz | |
| tar xf microkit-sdk-${{ env.MICROKIT_VERSION }}-macos-aarch64.tar.gz | |
| - name: Install dependencies (via Homebrew) | |
| run: | | |
| brew install llvm lld make imagemagick dtc | |
| echo "/opt/homebrew/opt/llvm/bin:$PATH" >> $GITHUB_PATH | |
| - name: Install Zig | |
| uses: mlugg/setup-zig@v2.2.1 | |
| with: | |
| version: ${{ env.ZIG_VERSION }} | |
| - name: Setup pyenv | |
| run: | | |
| python3.13 -m venv venv | |
| ./venv/bin/pip install --upgrade sdfgen==${{ env.SDFGEN_VERSION }} | |
| - name: Setup systems-ci | |
| uses: au-ts/systems-ci@main | |
| - name: Build examples | |
| run: python3.13 ./ci/build.py ${PWD}/microkit-sdk-${{ env.MICROKIT_VERSION }} $(nproc) | |
| shell: bash | |
| env: | |
| PYTHON: ${{ github.workspace }}/venv/bin/python | |
| run_qemu: | |
| name: Run (QEMU) | |
| runs-on: ubuntu-latest | |
| needs: build_linux_x86_64_nix | |
| steps: | |
| - name: Checkout sDDF repository | |
| uses: actions/checkout@v6 | |
| - name: Install dependencies (via apt) | |
| run: | | |
| sudo apt update | |
| sudo apt-get install qemu-system-arm qemu-system-misc qemu-system-x86 | |
| - name: Setup systems-ci | |
| uses: au-ts/systems-ci@main | |
| - name: Download images | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: loader-images | |
| path: ci_build | |
| - name: Run tests | |
| run: | | |
| export PATH="$(pwd)/machine_queue":$PATH | |
| exec ./ci/run.py --only-qemu | |
| - name: Archive logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ci-logs-qemu | |
| path: ci_logs | |
| if-no-files-found: error | |
| run_hardware: | |
| name: Run (hardware) | |
| runs-on: ubuntu-latest | |
| if: ${{ github.repository_owner == 'au-ts' && | |
| ( | |
| (github.event_name == 'schedule') || | |
| (github.event_name == 'pull_request' && | |
| ( | |
| (github.event.action != 'labeled' && contains(github.event.pull_request.labels.*.name, 'hardware-test')) || | |
| (github.event.action == 'labeled' && github.event.label.name == 'hardware-test') | |
| ) | |
| ) | |
| ) | |
| }} | |
| needs: build_linux_x86_64_nix | |
| concurrency: | |
| group: ${{ github.workflow }}-sddf-hardware-tests-${{ github.event.number }}-${{ strategy.job-index }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout sDDF repository | |
| uses: actions/checkout@v6 | |
| - name: Get machine queue | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: seL4/machine_queue | |
| path: machine_queue | |
| - name: Download images | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: loader-images | |
| path: ci_build | |
| - name: Setup systems-ci | |
| uses: au-ts/systems-ci@main | |
| - name: Setup machine queue SSH key | |
| run: .github/workflows/setup_ssh_key.sh | |
| env: | |
| MACHINE_QUEUE_KEY: ${{ secrets.MACHINE_QUEUE_KEY }} | |
| - name: Run tests | |
| run: | | |
| export PATH="$(pwd)/machine_queue":$PATH | |
| # GitHub Actions is broken | |
| # https://github.com/ringerc/github-actions-signal-handling-demo#why-child-process-tasks-dont-get-a-chance-to-clean-up-on-job-cancel | |
| exec ./ci/run.py --no-only-qemu | |
| - name: Archive logs | |
| if: always() | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: ci-logs-hardware | |
| path: ci_logs | |
| if-no-files-found: error |