1
- # Makefile already defines the build process, ensuring consistency between local development and CI.
2
-
3
- name : Build and Test (CUDA)
1
+ name : Go - Build and Test (CUDA)
4
2
5
3
on :
6
4
push :
7
- branches :
8
- - cicd
5
+ branches : [ "cicd" ]
9
6
pull_request :
10
- branches :
11
- - cicd
7
+ branches : [ "cicd" ]
12
8
13
9
jobs :
14
10
build :
11
+
15
12
runs-on : ubuntu-latest
16
13
17
14
steps :
18
- - name : Checkout code
19
- uses : actions/checkout@v3
20
-
21
- - name : Set up Go
22
- uses : actions/setup-go@v3
23
- with :
24
- go-version : 1.21.1
25
-
26
- - name : Install CUDA Toolkit
27
- run : |
28
- # Install CUDA Toolkit (replace with your specific installation commands)
29
- sudo apt-get update
30
- sudo apt-get install -y cuda-toolkit-11.8
31
-
32
- - name : Install CMake
33
- run : sudo apt-get install -y cmake
34
-
35
- - name : Build with Makefile
36
- run : make all
37
-
38
- - name : Create Artifacts
39
- run : |
40
- mkdir -p artifacts
41
- cp eternal artifacts/
42
- cp pkg/llm/local/gguf/build/bin/* artifacts/
43
- cp pkg/sd/sdcpp/build/bin/* artifacts/
44
-
45
- - name : Upload Artifacts
46
- uses : actions/upload-artifact@v3
47
- with :
48
- name : build-artifacts
49
- path : artifacts
15
+ - uses : actions/checkout@v4
16
+
17
+ - name : Set up Go
18
+ uses : actions/setup-go@v5
19
+ with :
20
+ go-version : ' 1.21.x'
21
+
22
+ - name : Install CUDA Toolkit
23
+ run : |
24
+ # Install CUDA Toolkit (replace with your specific installation commands)
25
+ sudo apt-get update
26
+ sudo apt-get install -y cuda-toolkit-11.8
27
+
28
+ - name : Install CMake
29
+ run : sudo apt-get install -y cmake
30
+
31
+ - name : Set Build Environment
32
+ run : |
33
+ echo "GOOS=linux" >> $GITHUB_ENV
34
+ echo "GOARCH=amd64" >> $GITHUB_ENV
35
+
36
+ - name : Build with Makefile
37
+ run : make all
38
+
39
+ - name : Create Artifacts
40
+ run : |
41
+ mkdir -p artifacts
42
+ cp eternal artifacts/
43
+
44
+ - name : Upload Artifacts
45
+ uses : actions/upload-artifact@v4
46
+ with :
47
+ name : build-artifacts
48
+ path : artifacts
0 commit comments