File: linux-llvm.yml

package info (click to toggle)
gnu-efi 4.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,916 kB
  • sloc: ansic: 18,175; asm: 2,317; makefile: 321; sh: 102
file content (92 lines) | stat: -rw-r--r-- 2,508 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: Linux, LLVM

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        arch: [x64]
        include:
          - arch: x64
            dir: x86_64
            gcc: multilib
            cross_compile:

    steps:
    - name: Install toolchain
      run: |
        sudo apt-get update
        sudo apt-get install gcc-${{ matrix.gcc }} clang lld

    - name: Checkout repository
      uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - name: Build
      run: make ARCH=${{ matrix.arch }} CROSS_COMPILE=${{ matrix.cross_compile }} CC=clang LD=ld.lld

    - name: Generate binary information
      run: readelf -a ./${{ matrix.dir }}/apps/ctors_dtors_priority_test.so > ./${{ matrix.dir }}/apps/readelf.txt

    - name: Upload artifacts
      uses: actions/upload-artifact@v4
      with:
        name: ${{ matrix.arch }}
        path: |
          ./${{ matrix.dir }}/apps/*
  tests:
    runs-on: ubuntu-24.04
    needs: build

    strategy:
      matrix:
        arch: [x64]
        include:
        - arch: x64
          pkg: qemu-system-x86
          qemu_arch: x86_64
          qemu_opts: -M q35
          fw_base: OVMF

    steps:
    - name: Set up Linux environment
      run: |
        sudo apt-get update
        sudo apt-get -y --no-install-recommends install ${{ matrix.pkg }}

    - name: Checkout repository
      uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - name: Download artifacts
      uses: actions/download-artifact@v4
      with:
        name: ${{ matrix.arch }}

    - name: Download UEFI firmware
      run: |
        fw_arch=$(echo ${{ matrix.arch }} | tr a-z A-Z)
        fw_zip=${{ matrix.fw_base }}-${fw_arch}.zip
        curl -O https://efi.akeo.ie/${{ matrix.fw_base }}/${fw_zip}
        7z x ${fw_zip}
        rm ${fw_zip}

    - name: Download UEFI Shell
      run: |
        curl -L -O https://github.com/pbatard/UEFI-Shell/releases/download/23H2/UEFI-Shell-2.2-23H2-RELEASE.iso
        mkdir ./image
        7z x -o./image *.iso
        rm *.iso

    - name: Run tests
      run: |
        export UEFI_ARCH=${{ matrix.arch }}
        export UEFI_DIR=./image
        export QEMU_CMD="qemu-system-${{ matrix.qemu_arch }} ${{ matrix.qemu_opts }} -nodefaults -nographic -serial stdio -net none -L . -drive if=pflash,format=raw,unit=0,file=${{ matrix.fw_base }}.fd,readonly=on -drive format=raw,file=fat:rw:image"
        ./tests/gen_tests.sh ./tests/test_list.txt
        ./tests/run_tests.sh