Skip to content

Commit d722c92

Browse files
committed
Clean up such that docer file functions
1 parent c7a2eac commit d722c92

File tree

7 files changed

+37
-29
lines changed

7 files changed

+37
-29
lines changed

Dockerfile

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
11
FROM ubuntu:focal
2-
# TODO: update to clang 11
32
RUN export DEBIAN_FRONTEND=noninteractive && \
43
apt-get update && \
54
apt-get install -y build-essential glslang-tools clang golang-go cargo rustc git && \
65
go get golang.org/x/tools/cmd/goimports && cp /root/go/bin/goimports /bin/ && \
76
mkdir /data
87

8+
RUN export DEBIAN_FRONTEND=noninteractive && \
9+
apt-get update && \
10+
apt-get install -y lua5.3
11+
912
# Prebuild rust tool to make it go quicker for user
1013
COPY gl2c gl2c
1114
RUN cd gl2c && env PATH="$HOME/.cargo/bin:$PATH" cargo build
1215

16+
17+
18+
COPY glbind glbind
19+
COPY go.mod go.mod
20+
COPY go.sum go.sum
1321
# Pre-download go modules to make it quicker for user
1422
RUN go get github.com/termie/go-shutil
1523

16-
COPY glbind glbind
1724
COPY runtime runtime
1825
COPY script script
1926

2027
VOLUME [ "/build" ]
2128

22-
ENTRYPOINT ["/script/docker.sh"]
29+
ENTRYPOINT ["/script/docker.sh"]
30+
#ENTRYPOINT ["/bin/bash"]

a.out

-12.4 KB
Binary file not shown.

glbind/gen_go.go

+16-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

glbind/gen_gotypes.go

-14
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

main.cpp

-10
This file was deleted.

script/build.go

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package main
22

33
import (
4+
"fmt"
45
"log"
56
"os"
67
"os/exec"
@@ -100,7 +101,13 @@ func main() {
100101
cp("build/shader.so", "build/go/build/shader.so")
101102
}
102103
cp("build/generated/shared.h", "build/go/shared.h")
103-
ensure(runf("build/go", "go", "test", "-v", "."))
104+
105+
files, _ = filepath.Glob("build/go/*.go")
106+
for i := range files {
107+
files[i] = filepath.Base(files[i])
108+
}
109+
fmt.Println(files)
110+
ensure(runf("build/go", "go", append([]string{"test", "-v"}, files...)...))
104111
}
105112

106113
func run(m string, args ...string) error {

script/docker.sh

+2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ set -e
55
name=${1%.comp}
66
echo "doing package $name"
77
go run script/build.go /data/$1
8+
echo "done b"
89
cp -r /build/go/* /data/
910
sed -i "1,3s/kernel/$name/g" /data/kernel.go
11+
sed -i "1,3s/kernel/$name/g" /data/types.go
1012
mv /data/kernel.go /data/$name.go

0 commit comments

Comments
 (0)