From 0185b43c2f961e97e94878a3d2dc87eec1810bd4 Mon Sep 17 00:00:00 2001
From: Mikkel Hjortshoej
Date: Tue, 5 Feb 2019 18:59:10 +0100
Subject: [PATCH 1/2] Create CI files
---
.travis.yml | 18 ++++++++++++++++++
README.md | 7 +++++++
appveyor.yml | 19 +++++++++++++++++++
build.bat | 1 -
build_ci.bat | 27 +++++++++++++++++++++++++++
examples/demo/demo.odin | 14 +-------------
6 files changed, 72 insertions(+), 14 deletions(-)
create mode 100644 .travis.yml
create mode 100644 appveyor.yml
create mode 100644 build_ci.bat
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 000000000..d81646770
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,18 @@
+language: cpp
+git:
+ depth: false
+
+os:
+ - linux
+ - osx
+
+compiler:
+ - clang
+
+script:
+ - make release
+ - ./odin run examples/demo/demo.odin
+ - ./odin check examples/demo/demo.odin -vet
+
+notifications:
+ email: false
\ No newline at end of file
diff --git a/README.md b/README.md
index 31b70c837..981aa7499 100644
--- a/README.md
+++ b/README.md
@@ -13,6 +13,13 @@
+
+
+
+
+
+
+
# The Odin Programming Language
diff --git a/appveyor.yml b/appveyor.yml
new file mode 100644
index 000000000..5e5abe979
--- /dev/null
+++ b/appveyor.yml
@@ -0,0 +1,19 @@
+image:
+ - Visual Studio 2017
+shallow_clone: true
+
+platform: x64
+
+install:
+ - cd bin
+ - appveyor DownloadFile https://github.com/odin-lang/Odin/releases/download/llvm-windows/llvm-binaries.zip
+ - 7z x llvm-binaries.zip > nul
+ - cd ..
+
+build_script:
+ - call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars64.bat"
+ - ./build_ci.bat
+
+test_script:
+ - odin run examples/demo/demo.odin
+ - odin check examples/demo/demo.odin -vet
\ No newline at end of file
diff --git a/build.bat b/build.bat
index 296e7b179..c3754d79b 100644
--- a/build.bat
+++ b/build.bat
@@ -42,7 +42,6 @@ del *.ilk > NUL 2> NUL
cl %compiler_settings% "src\main.cpp" ^
/link %linker_settings% -OUT:%exe_name% ^
- && odin run examples/demo/demo.odin
del *.obj > NUL 2> NUL
diff --git a/build_ci.bat b/build_ci.bat
new file mode 100644
index 000000000..42ff20b10
--- /dev/null
+++ b/build_ci.bat
@@ -0,0 +1,27 @@
+@echo off
+
+:: Make sure this is a decent name and not generic
+set exe_name=odin.exe
+
+:: Debug = 0, Release = 1
+set release_mode=1
+set compiler_flags= -nologo -Oi -TP -fp:precise -Gm- -MP -FC -GS- -EHsc- -GR- -O2 -MT -Z7 -DNO_ARRAY_BOUNDS_CHECK
+set compiler_warnings= ^
+ -W4 -WX ^
+ -wd4100 -wd4101 -wd4127 -wd4189 ^
+ -wd4201 -wd4204 ^
+ -wd4456 -wd4457 -wd4480 ^
+ -wd4512
+
+set compiler_includes=
+set libs= ^
+ kernel32.lib
+
+set linker_flags= -incremental:no -opt:ref -subsystem:console -debug
+
+set compiler_settings=%compiler_includes% %compiler_flags% %compiler_warnings%
+set linker_settings=%libs% %linker_flags%
+
+cl %compiler_settings% "src\main.cpp" ^
+ /link %linker_settings% -OUT:%exe_name% ^
+
diff --git a/examples/demo/demo.odin b/examples/demo/demo.odin
index 6ba8aea76..b4c67938f 100644
--- a/examples/demo/demo.odin
+++ b/examples/demo/demo.odin
@@ -1,24 +1,12 @@
package main
import "core:fmt"
-import "core:strconv"
import "core:mem"
-import "core:bits"
-import "core:hash"
-import "core:math"
-import "core:math/rand"
import "core:os"
-import "core:sort"
-import "core:strings"
-import "core:types"
-import "core:unicode/utf16"
-import "core:unicode/utf8"
-import "core:c"
-import "core:runtime"
when os.OS == "windows" {
+ import "core:runtime"
import "core:thread"
- import "core:sys/win32"
}
@(link_name="general_stuff")
From c9602953aa4a88803c9ef5182aa8bb64d58b80b8 Mon Sep 17 00:00:00 2001
From: Mikkel Hjortshoej
Date: Tue, 5 Feb 2019 20:51:59 +0100
Subject: [PATCH 2/2] last fixes to bats and README
---
README.md | 8 ++++----
build.bat | 4 ++--
build_ci.bat | 3 ---
3 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index 981aa7499..cb69782c9 100644
--- a/README.md
+++ b/README.md
@@ -14,11 +14,11 @@
-
-
+
+
-
-
+
+
diff --git a/build.bat b/build.bat
index c3754d79b..402d8842c 100644
--- a/build.bat
+++ b/build.bat
@@ -42,8 +42,8 @@ del *.ilk > NUL 2> NUL
cl %compiler_settings% "src\main.cpp" ^
/link %linker_settings% -OUT:%exe_name% ^
+ && odin run examples/demo/demo.odin
del *.obj > NUL 2> NUL
-:end_of_build
-
+:end_of_build
\ No newline at end of file
diff --git a/build_ci.bat b/build_ci.bat
index 42ff20b10..53da20680 100644
--- a/build_ci.bat
+++ b/build_ci.bat
@@ -1,10 +1,7 @@
@echo off
-:: Make sure this is a decent name and not generic
set exe_name=odin.exe
-:: Debug = 0, Release = 1
-set release_mode=1
set compiler_flags= -nologo -Oi -TP -fp:precise -Gm- -MP -FC -GS- -EHsc- -GR- -O2 -MT -Z7 -DNO_ARRAY_BOUNDS_CHECK
set compiler_warnings= ^
-W4 -WX ^