aarch64.yml 1.5 KB
Newer Older
Stefan Lankes's avatar
Stefan Lankes committed
1
name: Test aarch64
Stefan Lankes's avatar
Stefan Lankes committed
2
3
4

on:
  pull_request:
5
  push:
Stefan Lankes's avatar
Stefan Lankes committed
6
7
    branches:
      - master
8
9
      - staging
      - trying
Stefan Lankes's avatar
Stefan Lankes committed
10
11
12
13
14
  schedule:
    - cron: '0 0 * * 6'

jobs:
  build:
15
    name: Test aarch64
Stefan Lankes's avatar
Stefan Lankes committed
16
17
18
19
    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
20
        os: [ubuntu-latest, macOS-latest]
Stefan Lankes's avatar
Stefan Lankes committed
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
        rust: [nightly]
        include:
          - os: macOS-latest
            rust: 'nightly'
            components: 'rust-src, llvm-tools-preview'
            targets: 'aarch64-apple-darwin'
          - os: ubuntu-latest
            rust: 'nightly'
            components: 'rust-src, llvm-tools-preview'
            targets: 'aarch64-unknown-linux-gnu'

    steps:
    - uses: hecrj/setup-rust-action@v1
      with: 
         rust-version: ${{ matrix.rust }}
         components: ${{ matrix.components || '' }}
         targets: ${{ matrix.targets || '' }}
38
    - uses: actions/checkout@v2
Stefan Lankes's avatar
Stefan Lankes committed
39
      with:
40
          lfs: true
Stefan Lankes's avatar
Stefan Lankes committed
41
42
    - name: Check Cargo availability
      run: cargo --version
43
44
    - name: Install qemu (apt)
      run: sudo apt-get update --fix-missing && sudo apt-get install qemu-system-aarch64
Stefan Lankes's avatar
Stefan Lankes committed
45
      if: ${{ matrix.os == 'ubuntu-latest' }}
46
    - name: Install qemu (macos)
Stefan Lankes's avatar
Stefan Lankes committed
47
      run: |
48
          brew install qemu
Stefan Lankes's avatar
Stefan Lankes committed
49
50
51
      if: ${{ matrix.os == 'macOS-latest' }}
    - name: Build loader (unix)
      run: make arch=aarch64
52
53
54
    - name: Test loader
      run: qemu-system-aarch64 -display none -smp 4 -m 1G -serial stdio -kernel target/aarch64-unknown-hermit-loader/debug/rusty-loader -machine raspi3 -semihosting
      timeout-minutes: 1