3939 BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
4040
4141jobs :
42- ubuntu-latest-cmake :
43- runs-on : ubuntu-latest
44-
45- steps :
46- - name : Clone
47- id : checkout
48- uses : actions/checkout@v3
49- with :
50- submodules : recursive
51-
52- - name : Dependencies
53- id : depends
54- run : |
55- sudo apt-get update
56- sudo apt-get install build-essential
57-
58- - name : Build
59- id : cmake_build
60- run : |
61- mkdir build
62- cd build
63- cmake .. -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON
64- cmake --build . --config Release
65-
66- - name : Get commit hash
67- id : commit
68- if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.event.inputs.create_release == 'true' }}
69- uses : pr-mpt/actions-commit-hash@v2
70-
71- - name : Fetch system info
72- id : system-info
73- run : |
74- echo "CPU_ARCH=`uname -m`" >> "$GITHUB_OUTPUT"
75- echo "OS_NAME=`lsb_release -s -i`" >> "$GITHUB_OUTPUT"
76- echo "OS_VERSION=`lsb_release -s -r`" >> "$GITHUB_OUTPUT"
77- echo "OS_TYPE=`uname -s`" >> "$GITHUB_OUTPUT"
78-
79- - name : Pack artifacts
80- id : pack_artifacts
81- if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
82- run : |
83- cp ggml/LICENSE ./build/bin/ggml.txt
84- cp LICENSE ./build/bin/stable-diffusion.cpp.txt
85- zip -j sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip ./build/bin/*
86-
87- - name : Upload artifacts
88- if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
89- uses : actions/upload-artifact@v4
90- with :
91- name : sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
92- path : |
93- sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
94-
95- macOS-latest-cmake :
96- runs-on : macos-latest
97-
98- steps :
99- - name : Clone
100- id : checkout
101- uses : actions/checkout@v3
102- with :
103- submodules : recursive
104-
105- - name : Dependencies
106- id : depends
107- run : |
108- brew install zip
109-
110- - name : Build
111- id : cmake_build
112- run : |
113- sysctl -a
114- mkdir build
115- cd build
116- cmake .. -DGGML_AVX2=ON -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DSD_BUILD_SHARED_LIBS=ON
117- cmake --build . --config Release
118-
119- - name : Get commit hash
120- id : commit
121- if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.event.inputs.create_release == 'true' }}
122- uses : pr-mpt/actions-commit-hash@v2
123-
124- - name : Fetch system info
125- id : system-info
126- run : |
127- echo "CPU_ARCH=`uname -m`" >> "$GITHUB_OUTPUT"
128- echo "OS_NAME=`sw_vers -productName`" >> "$GITHUB_OUTPUT"
129- echo "OS_VERSION=`sw_vers -productVersion`" >> "$GITHUB_OUTPUT"
130- echo "OS_TYPE=`uname -s`" >> "$GITHUB_OUTPUT"
131-
132- - name : Pack artifacts
133- id : pack_artifacts
134- if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
135- run : |
136- cp ggml/LICENSE ./build/bin/ggml.txt
137- cp LICENSE ./build/bin/stable-diffusion.cpp.txt
138- zip -j sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip ./build/bin/*
139-
140- - name : Upload artifacts
141- if : ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/master' ) || github.event.inputs.create_release == 'true' }}
142- uses : actions/upload-artifact@v4
143- with :
144- name : sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
145- path : |
146- sd-${{ env.BRANCH_NAME }}-${{ steps.commit.outputs.short }}-bin-${{ steps.system-info.outputs.OS_TYPE }}-${{ steps.system-info.outputs.OS_NAME }}-${{ steps.system-info.outputs.OS_VERSION }}-${{ steps.system-info.outputs.CPU_ARCH }}.zip
147-
14842 windows-latest-cmake :
14943 runs-on : windows-2019
15044
@@ -156,18 +50,18 @@ jobs:
15650 include :
15751 - build : " noavx"
15852 defines : " -DGGML_NATIVE=OFF -DGGML_AVX=OFF -DGGML_AVX2=OFF -DGGML_FMA=OFF -DSD_BUILD_SHARED_LIBS=ON"
159- - build : " avx2"
160- defines : " -DGGML_NATIVE=OFF -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON"
53+ # - build: "avx2"
54+ # defines: "-DGGML_NATIVE=OFF -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON"
16155 - build : " avx"
16256 defines : " -DGGML_NATIVE=OFF -DGGML_AVX=ON -DGGML_AVX2=OFF -DSD_BUILD_SHARED_LIBS=ON"
163- - build : " avx512"
164- defines : " -DGGML_NATIVE=OFF -DGGML_AVX512=ON -DGGML_AVX=ON -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON"
165- - build : " cuda12"
166- defines : " -DSD_CUDA=ON -DSD_BUILD_SHARED_LIBS=ON -DCMAKE_CUDA_ARCHITECTURES=60;61;70;75"
57+ # - build: "avx512"
58+ # defines: "-DGGML_NATIVE=OFF -DGGML_AVX512=ON -DGGML_AVX=ON -DGGML_AVX2=ON -DSD_BUILD_SHARED_LIBS=ON"
59+ # - build: "cuda12"
60+ # defines: "-DSD_CUDA=ON -DSD_BUILD_SHARED_LIBS=ON -DCMAKE_CUDA_ARCHITECTURES=60;61;70;75"
16761 # - build: "rocm5.5"
16862 # defines: '-G Ninja -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DSD_HIPBLAS=ON -DCMAKE_BUILD_TYPE=Release -DAMDGPU_TARGETS="gfx1100;gfx1102;gfx1030" -DSD_BUILD_SHARED_LIBS=ON'
16963 - build : ' vulkan'
170- defines : " -DSD_VULKAN=ON -DSD_BUILD_SHARED_LIBS=ON"
64+ defines : " -DSD_VULKAN=ON -DGGML_AVX=ON -DGGML_AVX2=OFF - DSD_BUILD_SHARED_LIBS=ON"
17165 steps :
17266 - name : Clone
17367 id : checkout
@@ -283,8 +177,6 @@ jobs:
283177 runs-on : ubuntu-latest
284178
285179 needs :
286- - ubuntu-latest-cmake
287- - macOS-latest-cmake
288180 - windows-latest-cmake
289181
290182 steps :
0 commit comments