From 9095bffe3a36865fb0a39112decd229daa84c1a6 Mon Sep 17 00:00:00 2001 From: twistdroach Date: Tue, 29 Sep 2020 23:01:29 -0400 Subject: [PATCH 1/6] Create cmake.yml --- .github/workflows/cmake.yml | 46 +++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/cmake.yml diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..dae54ec --- /dev/null +++ b/.github/workflows/cmake.yml @@ -0,0 +1,46 @@ +name: CMake + +on: [push] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally + # well on Windows or Mac. You can convert this to a matrix build if you need + # cross-platform coverage. + # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Create Build Environment + # Some projects don't allow in-source building, so create a separate build directory + # We'll use this as our working directory for all subsequent commands + run: cmake -E make_directory ${{runner.workspace}}/build + + - name: Configure CMake + # Use a bash shell so we can use the same syntax for environment variable + # access regardless of the host operating system + shell: bash + working-directory: ${{runner.workspace}}/build + # Note the current convention is to use the -S and -B options here to specify source + # and build directories, but this is only available with CMake 3.13 and higher. + # The CMake binaries on the Github Actions machines are (as of this writing) 3.12 + run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE + + - name: Build + working-directory: ${{runner.workspace}}/build + shell: bash + # Execute the build. You can specify a specific target with "--target " + run: cmake --build . --config $BUILD_TYPE + + - name: Test + working-directory: ${{runner.workspace}}/build + shell: bash + # Execute tests defined by the CMake configuration. + # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail + run: ctest -C $BUILD_TYPE -- 2.39.2 From aea57745b7cbe268312add0c0101a692e16c8487 Mon Sep 17 00:00:00 2001 From: "Zachary D. Rowitsch" Date: Tue, 29 Sep 2020 23:20:36 -0400 Subject: [PATCH 2/6] with submodules --- .github/workflows/cmake.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index dae54ec..1b716d8 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -16,6 +16,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + submodules: true - name: Create Build Environment # Some projects don't allow in-source building, so create a separate build directory -- 2.39.2 From 422e04bf314a474fbdc68a34a0c9d3963534e842 Mon Sep 17 00:00:00 2001 From: "Zachary D. Rowitsch" Date: Tue, 29 Sep 2020 23:21:47 -0400 Subject: [PATCH 3/6] no releasetype --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 1b716d8..1aa2c2f 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -4,7 +4,7 @@ on: [push] env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) - BUILD_TYPE: Release + # BUILD_TYPE: Release jobs: build: -- 2.39.2 From fc2a2fd56bdf14caf0f5c8c90aacd8a04bb2a0aa Mon Sep 17 00:00:00 2001 From: "Zachary D. Rowitsch" Date: Tue, 29 Sep 2020 23:22:50 -0400 Subject: [PATCH 4/6] no releasetype --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 1aa2c2f..270ecbf 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -2,7 +2,7 @@ name: CMake on: [push] -env: +#env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) # BUILD_TYPE: Release -- 2.39.2 From 53b5c35dac3257308621e64dc2fe98c83d10ae34 Mon Sep 17 00:00:00 2001 From: "Zachary D. Rowitsch" Date: Tue, 29 Sep 2020 23:27:33 -0400 Subject: [PATCH 5/6] run on ubuntu 20.04 --- .github/workflows/cmake.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 270ecbf..64c3616 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -12,7 +12,7 @@ jobs: # well on Windows or Mac. You can convert this to a matrix build if you need # cross-platform coverage. # See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2 -- 2.39.2 From 1dc7ea46cfc25519c03ab1574ad50b60765e8add Mon Sep 17 00:00:00 2001 From: "Zachary D. Rowitsch" Date: Tue, 29 Sep 2020 23:39:41 -0400 Subject: [PATCH 6/6] add badge to readme --- .github/workflows/{cmake.yml => CI.yml} | 0 README.md | 4 +++- 2 files changed, 3 insertions(+), 1 deletion(-) rename .github/workflows/{cmake.yml => CI.yml} (100%) diff --git a/.github/workflows/cmake.yml b/.github/workflows/CI.yml similarity index 100% rename from .github/workflows/cmake.yml rename to .github/workflows/CI.yml diff --git a/README.md b/README.md index 3cbee21..f770c89 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # raytracer-c +[![CI Actions Status](https://github.com/twistdroach/raytracer-c/workflows/CI/badge.svg)](https://github.com/twistdroach/raytracer-c/actions) + Current executables (and sample output) are: ## main/parabola @@ -85,4 +87,4 @@ Now with normal interpolation...starting to slow down with lots of triangles/ref An obvious performance improvement would be to add some group bounding, so we don't have to check all triangles for intersections when we aren't even close. In any event, flamegraphs are a fun way to see what is going on. -![](images/glass_teapot_flamegraph.svg) \ No newline at end of file +![](images/glass_teapot_flamegraph.svg) -- 2.39.2