|
1 | | -name: BuildAll |
| 1 | +name: Build |
2 | 2 |
|
3 | | -on: [push, pull_request] |
4 | | - |
5 | | -env: |
6 | | - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
7 | | - BUILD_TYPE: Release |
| 3 | +on: |
| 4 | + push: |
| 5 | + pull_request: |
| 6 | + workflow_dispatch: |
8 | 7 |
|
9 | 8 | jobs: |
10 | | - build_halide: |
11 | | - name: build_halide-${{matrix.target_os}}-${{matrix.target_arch}}-${{matrix.target_bits}} |
12 | | - runs-on: ${{matrix.host_os}} |
13 | | - env: |
14 | | - CC: ${{matrix.cc}} |
15 | | - CXX: ${{matrix.cxx}} |
16 | | - LD: ${{matrix.ld}} |
17 | | - THIRDPARTY_DIR: ${{github.workspace}}/3rdparty |
18 | | - HALIDE_BUILD_DIR: ${{github.workspace}}/3rdparty/Halide-10.0.0/build |
19 | | - HALIDE_INSTALL_DIR: ${{github.workspace}}/3rdparty/Halide-10.0.0/install |
20 | | - strategy: |
21 | | - matrix: |
22 | | - target_arch: [x86, arm] |
23 | | - target_bits: [32, 64] |
24 | | - target_os: [linux] |
25 | | - include: |
26 | | - - target_os: linux |
27 | | - host_os: ubuntu-18.04 |
28 | | - cc: clang-10 |
29 | | - cxx: clang++-10 |
30 | | - ld: ld |
31 | | - |
| 9 | + build: |
| 10 | + runs-on: ubuntu-latest |
32 | 11 | steps: |
33 | | - - name: Configure Ubuntu/linux target os |
34 | | - if: startsWith(matrix.host_os, 'ubuntu') |
35 | | - shell: bash |
36 | | - run: | |
37 | | - sudo apt-get update |
38 | | - sudo apt install clang-10 llvm-10 libclang-10-dev |
39 | | - sudo apt purge clang-9 llvm-9 clang-8 llvm-8 clang-6.0 llvm-6.0 |
40 | | - - uses: actions/checkout@v1 |
| 12 | + - uses: actions/checkout@v4 |
41 | 13 |
|
42 | | - - name: Download Halide |
43 | | - run: | |
44 | | - mkdir -p ${THIRDPARTY_DIR} && cd ${THIRDPARTY_DIR} |
45 | | - wget https://github.com/halide/Halide/archive/v10.0.0.zip |
46 | | - unzip -o v10.0.0.zip |
47 | | - - name: Build Halide-${{matrix.target_os}}-${{matrix.target_arch}}-${{matrix.target_bits}} |
48 | | - working-directory: ${{ github.workspace }}/3rdparty |
49 | | - run: | |
50 | | - mkdir -p ${HALIDE_BUILD_DIR} && cd ${HALIDE_BUILD_DIR} |
51 | | - cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${HALIDE_INSTALL_DIR} \ |
52 | | - -DWITH_TESTS=OFF -DWITH_APPS=OFF -DWITH_TUTORIALS=OFF \ |
53 | | - -DWITH_ARM=OFF -DWITH_AARCH64=OFF -DWITH_HEXAGON=OFF -DWITH_MIPS=OFF -DWITH_POWERPC=OFF -DWITH_NVPTX=OFF -DWITH_RISCV=OFF \ |
54 | | - .. |
55 | | - make -j 8 install |
56 | | - - name: Upload Install Directory |
57 | | - uses: actions/upload-artifact@v1 |
| 14 | + - uses: cachix/install-nix-action@v30 |
58 | 15 | with: |
59 | | - name: halide-install |
60 | | - path: ${{ github.workspace }}/3rdparty/Halide-10.0.0/install/ |
61 | | - |
62 | | - build_all: |
63 | | - needs: build_halide |
64 | | - name: build_all-${{matrix.target_os}}-${{matrix.target_arch}}-${{matrix.target_bits}} |
65 | | - runs-on: ${{matrix.host_os}} |
66 | | - env: |
67 | | - BUILD_DIR: ${{github.workspace}}/build |
68 | | - HALIDE_DISTRIB_DIR: ${{github.workspace}}/3rdparty/Halide |
69 | | - CC: ${{matrix.cc}} |
70 | | - CXX: ${{matrix.cxx}} |
71 | | - LD: ${{matrix.ld}} |
72 | | - THIRDPARTY_DIR: ${{github.workspace}}/3rdparty |
73 | | - strategy: |
74 | | - matrix: |
75 | | - target_arch: [x86, arm] |
76 | | - target_bits: [32, 64] |
77 | | - target_os: [linux] |
78 | | - include: |
79 | | - - target_os: linux |
80 | | - host_os: ubuntu-18.04 |
81 | | - cc: clang |
82 | | - cxx: clang++ |
83 | | - ld: ld |
| 16 | + nix_path: nixpkgs=channel:nixos-25.11 |
84 | 17 |
|
85 | | - steps: |
86 | | - - uses: actions/checkout@v1 |
87 | | - |
88 | | - - name: Download Halide |
89 | | - uses: actions/download-artifact@v1 |
| 18 | + - uses: cachix/cachix-action@v15 |
90 | 19 | with: |
91 | | - name: halide-install |
92 | | - path: ${{github.workspace}}/3rdparty/Halide |
93 | | - |
94 | | - - name: List 3rdparty |
95 | | - run: | |
96 | | - ls -lha ${{github.workspace}}/3rdparty |
97 | | - ls -lha ${HALIDE_DISTRIB_DIR} |
98 | | - - name: Install Dependencies |
99 | | - run: sudo apt update && sudo apt install -y libtiff-dev libraw-dev libpng-dev libjpeg-dev zlib1g-dev |
| 20 | + name: devenv |
100 | 21 |
|
101 | | - - name: Configure CMake |
102 | | - shell: bash |
103 | | - working-directory: ${{github.workspace}} |
104 | | - run: | |
105 | | - mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} |
106 | | - cmake -DHALIDE_DISTRIB_DIR=${HALIDE_DISTRIB_DIR} -DCMAKE_BUILD_TYPE=$BUILD_TYPE .. |
107 | 22 | - name: Build |
108 | | - shell: bash |
109 | | - working-directory: ${{github.workspace}} |
110 | | - run: cd ${BUILD_DIR} && make -j 8 all |
| 23 | + run: nix build -L |
111 | 24 |
|
112 | | -# - name: Test |
113 | | -# working-directory: ${{runner.workspace}}/build |
114 | | -# shell: bash |
115 | | -# # Execute tests defined by the CMake configuration. |
116 | | -# # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail |
117 | | -# run: ctest -C $BUILD_TYPE |
| 25 | + - name: Check |
| 26 | + run: nix flake check |
0 commit comments