Last active
August 25, 2023 02:52
-
-
Save nalgeon/b856a1cdcbc315a2f8f5c941f933d315 to your computer and use it in GitHub Desktop.
Trying Odin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# build stage | |
FROM alpine:3.16 as builder | |
RUN apk add --no-cache clang llvm-dev g++ wget unzip bash linux-headers libc6-compat git | |
RUN git clone https://github.com/odin-lang/odin | |
WORKDIR /odin | |
RUN git checkout dev-2023-08 | |
RUN bash build_odin.sh debug | |
# actual image | |
FROM alpine:3.16 | |
RUN apk add clang g++ | |
RUN mkdir /odin | |
COPY --from=builder /odin/vendor /odin/vendor | |
COPY --from=builder /odin/shared /odin/shared | |
COPY --from=builder /odin/odin /odin/odin | |
COPY --from=builder /odin/examples /odin/examples | |
COPY --from=builder /odin/core /odin/core | |
ENV PATH $PATH:/odin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "core:fmt" | |
main :: proc() { | |
fmt.println("Hellope!") | |
// Hellope! | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
image: | |
docker build --tag odin:latest . | |
run: | |
@docker run --rm --volume $(shell pwd):/sandbox --workdir /sandbox odin:latest odin run . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment