aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/arch_ci.yml
blob: 9cb65f122b1115851b731cd7f4f76df08bb84a4f (plain)
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
93
94
95
96
# CI for everything other than the sui generis FPGA interchange arrangements

name: Arch CI tests

on: [push, pull_request]

jobs:
  Build-nextpnr:
    strategy:
      fail-fast: false
      matrix:
        arch: [mistral, ice40, ecp5, generic, nexus, machxo2, gowin]
    runs-on: ubuntu-latest
    env:
      DEPS_PATH: ${{ github.workspace }}/deps
      YOSYS_REVISION: bd7ee79486d4e8788f36de8c25a3fb2df451d682
      ICESTORM_REVISION: 9f66f9ce16941c6417813cb87653c735a78b53ae
      TRELLIS_REVISION: 6280c4d1e73b50935b61b24dbaaf2a6a355be001
      PRJOXIDE_REVISION: c3fb1526cf4a2165e15b74f4a994d153c7695fe4
      MISTRAL_REVISION: ebfc0dd2cc7d6d2159b641a397c88554840e93c9
      APYCULA_REVISION: 0.5.1a1
    steps:
    - uses: actions/checkout@v3
      with:
        submodules: recursive

    - uses: actions/setup-python@v4
      with:
        python-version: '3.10'
    - name: Install
      run: |
        sudo apt-get update
        sudo apt-get install git make cmake libboost-all-dev python3-dev libeigen3-dev tcl-dev lzma-dev libftdi-dev clang bison flex swig qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools iverilog

    - name: Cache yosys installation
      uses: actions/cache@v3
      id: cache-yosys
      with:
        path: .yosys
        key: cache-yosys-${{ env.YOSYS_REVISION }}-r3

    - name: Build yosys
      run: |
        source ./.github/ci/build_common.sh
        build_yosys
      if: steps.cache-yosys.outputs.cache-hit != 'true'

    - name: Cache icestorm installation
      uses: actions/cache@v3
      id: cache-icestorm
      with:
        path: .icestorm
        key: cache-icestorm-${{ env.ICESTORM_REVISION }}-r3
      if: matrix.arch == 'ice40'

    - name: Build icestorm
      run: |
        source ./.github/ci/build_common.sh
        build_icestorm
      if: matrix.arch == 'ice40' && steps.cache-icestorm.outputs.cache-hit != 'true'

    - name: Cache trellis installation
      uses: actions/cache@v3
      id: cache-trellis
      with:
        path: .trellis
        key: cache-trellis-${{ env.TRELLIS_REVISION }}-r3
      if: matrix.arch == 'ecp5' || matrix.arch == 'machxo2'

    - name: Build trellis
      run: |
        source ./.github/ci/build_common.sh
        build_trellis
      if: (matrix.arch == 'ecp5' || matrix.arch == 'machxo2') && steps.cache-trellis.outputs.cache-hit != 'true'

    - name: Cache prjoxide installation
      uses: actions/cache@v3
      id: cache-prjoxide
      with:
        path: .prjoxide
        key: cache-prjoxide-${{ env.PRJOXIDE_REVISION }}-r3
      if: matrix.arch == 'nexus'

    - name: Build prjoxide
      run: |
        source ./.github/ci/build_common.sh
        build_prjoxide
      if: matrix.arch == 'nexus' && steps.cache-prjoxide.outputs.cache-hit != 'true'

    - name: Execute build nextpnr
      run: |
        source ./.github/ci/build_${{ matrix.arch }}.sh
        get_dependencies
        build_nextpnr
        run_tests
        run_archcheck