From bd36db0f7a26fa92c2f2d84c33980fc3f99f805a Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 22:46:11 +0100 Subject: [PATCH 001/107] wf --- .github/workflows/CD.yml | 9 --------- 1 file changed, 9 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 26671882..bc931155 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,10 +1 @@ name: CD -on: - push: - branches: [develop] - workflow_dispatch: -jobs: - debian: - runs-on: debian-stable - arch: - runs-on: arch From a2b555372d1144804cb40d15bdbbd09fe5992f3a Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 22:55:51 +0100 Subject: [PATCH 002/107] ci --- .github/workflows/CD.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index bc931155..04bae796 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1 +1,11 @@ -name: CD +name: Packaging +on: + push: + branches: [feature/gh-actions] + workflow_dispatch: +jobs: + debian: + runs-on: ubuntu-latest + name: "Create .deb files with dpkg-deb" + steps: + - run: ${{ github.action_path }}/packaging/create-deb.sh From 6f8fef7f6a57345c830897daf206cd95c4fde230 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:03:16 +0100 Subject: [PATCH 003/107] shell --- .github/workflows/CD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 04bae796..f9b80dc6 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -9,3 +9,4 @@ jobs: name: "Create .deb files with dpkg-deb" steps: - run: ${{ github.action_path }}/packaging/create-deb.sh + shell: bash From 3c432dcd51eaffceddf6614379eadfb027e5f993 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:04:52 +0100 Subject: [PATCH 004/107] var --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index f9b80dc6..05a06f28 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -8,5 +8,5 @@ jobs: runs-on: ubuntu-latest name: "Create .deb files with dpkg-deb" steps: - - run: ${{ github.action_path }}/packaging/create-deb.sh + - run: $GITHUB_ACTION_PATH/packaging/create-deb.sh shell: bash From 179f677cdd98524f9833965b227157b478fe2cc4 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:07:24 +0100 Subject: [PATCH 005/107] path --- .github/workflows/CD.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 05a06f28..f44fd40e 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -8,5 +8,6 @@ jobs: runs-on: ubuntu-latest name: "Create .deb files with dpkg-deb" steps: - - run: $GITHUB_ACTION_PATH/packaging/create-deb.sh + - run: > + ./packaging/create-deb.sh shell: bash From 5c8da83e95e82142488467084f27d7e6e38a3658 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:09:00 +0100 Subject: [PATCH 006/107] runs --- .github/workflows/CD.yml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index f44fd40e..29daf644 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -3,11 +3,8 @@ on: push: branches: [feature/gh-actions] workflow_dispatch: -jobs: - debian: - runs-on: ubuntu-latest - name: "Create .deb files with dpkg-deb" - steps: - - run: > - ./packaging/create-deb.sh - shell: bash +runs: + steps: + - run: > + ./packaging/create-deb.sh + shell: bash From 95ca8b75dcab49c1526cb3de57e12fe93de2afa3 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:09:54 +0100 Subject: [PATCH 007/107] ls --- .github/workflows/CD.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 29daf644..a2a1dce8 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -5,6 +5,5 @@ on: workflow_dispatch: runs: steps: - - run: > - ./packaging/create-deb.sh + - run: ls shell: bash From 082111975cf696588ed9e484fe9a1f65c6966afe Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:11:13 +0100 Subject: [PATCH 008/107] ls --- .github/workflows/CD.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index a2a1dce8..a4843e3c 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -4,6 +4,9 @@ on: branches: [feature/gh-actions] workflow_dispatch: runs: - steps: - - run: ls - shell: bash + debian: + runs-on: ubuntu-latest + name: "Create .deb files with dpkg-deb" + steps: + - run: ls + shell: bash From 8b9e173eb0c35a6881d846102cd9ce701d8df26b Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:11:54 +0100 Subject: [PATCH 009/107] ls --- .github/workflows/CD.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index a4843e3c..fd2e7bb3 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -9,4 +9,3 @@ runs: name: "Create .deb files with dpkg-deb" steps: - run: ls - shell: bash From c924ccee07ed895f98e864402c339a5ad91fd2bc Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:12:16 +0100 Subject: [PATCH 010/107] jobs --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index fd2e7bb3..a435cb17 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -3,7 +3,7 @@ on: push: branches: [feature/gh-actions] workflow_dispatch: -runs: +jobs: debian: runs-on: ubuntu-latest name: "Create .deb files with dpkg-deb" From 92ea32ad86b83bff1e728a462badbdf44469c1b9 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:17:20 +0100 Subject: [PATCH 011/107] bash --- .github/workflows/CD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index a435cb17..849d3de2 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -9,3 +9,4 @@ jobs: name: "Create .deb files with dpkg-deb" steps: - run: ls + shell: bash From 8ab80d1fff368d620a813a5630b73f7e99a14186 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:21:20 +0100 Subject: [PATCH 012/107] create-deb --- .github/workflows/CD.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 849d3de2..a46607db 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -6,7 +6,6 @@ on: jobs: debian: runs-on: ubuntu-latest - name: "Create .deb files with dpkg-deb" steps: - - run: ls + - run: ./packaging/create-deb.sh shell: bash From 0b782b6b77c18b671a473c6e311dc73c62f0d9b7 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:29:19 +0100 Subject: [PATCH 013/107] uses --- .github/workflows/CD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index a46607db..67c70110 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -9,3 +9,4 @@ jobs: steps: - run: ./packaging/create-deb.sh shell: bash + uses: cinnabar-engine/cinnabar@feature/gh-actions@ From 01a7b7abadb0b38b5e3d2cb308ae97aed86241ef Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:31:12 +0100 Subject: [PATCH 014/107] uses --- .github/workflows/CD.yml | 2 +- README.md | 248 +++++++++++++++++++++------------------ 2 files changed, 134 insertions(+), 116 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 67c70110..fe6dea24 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -9,4 +9,4 @@ jobs: steps: - run: ./packaging/create-deb.sh shell: bash - uses: cinnabar-engine/cinnabar@feature/gh-actions@ + uses: cinnabar-engine/cinnabar@feature/gh-actions diff --git a/README.md b/README.md index 73cb0094..9ec1b276 100644 --- a/README.md +++ b/README.md @@ -1,25 +1,36 @@ # Cinnabar Engine +[![.github/workflows/CD.yml](https://github.com/cinnabar-engine/cinnabar/actions/workflows/CD.yml/badge.svg)](https://github.com/cinnabar-engine/cinnabar/actions/workflows/CD.yml) + ## Prerequisites Use the build tool [CMake](https://cmake.org/install/) to build cinnabar. ### Windows + [Visual Studio](https://visualstudio.microsoft.com/) [VSCode](https://code.visualstudio.com/docs/cpp/config-msvc) + ### Debian + ```bash sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev ``` + ### Arch + ```bash sudo pacman -S base-devel cmake sdl2 glew glm assimp ``` + ### Redhat/Fedora + ```bash sudo dnf install kernel-devel cmake sdl // TODO ``` + ## Build Instructions + ```bash mkdir build cd build @@ -28,146 +39,153 @@ cmake --build . ``` ## Running -Windows: + +Windows: + ``` cd res ../build/run/cinnabar-engine.exe ``` + Linux: + ``` cd res ../build/run/cinnabar-engine ``` ## Libraries -* Build Pipeline: [CMake](https://cmake.org/) -* Window: [Simple Directmedia Layer](https://www.libsdl.org/) -* Rendering: [OpenGL](https://www.opengl.org/) -* OpenGL Extention Loader: [GLEW](http://glew.sourceforge.net/) -* Maths: [OpenGL Mathematics](https://glm.g-truc.net/0.9.9/index.html) -* Image: [STB Image](https://github.com/nothings/stb/blob/master/stb_image.h) -* Text Files: [std:fstream](https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.2/fstream.html) -* Logger: [Tumpnt Logger](https://github.com/Tumpnt/TumpntAudio/blob/master/src/core/tpnt_log.h) -* Time: [TumbleTime](https://github.com/tumble1999/tumble-time) + +- Build Pipeline: [CMake](https://cmake.org/) +- Window: [Simple Directmedia Layer](https://www.libsdl.org/) +- Rendering: [OpenGL](https://www.opengl.org/) +- OpenGL Extention Loader: [GLEW](http://glew.sourceforge.net/) +- Maths: [OpenGL Mathematics](https://glm.g-truc.net/0.9.9/index.html) +- Image: [STB Image](https://github.com/nothings/stb/blob/master/stb_image.h) +- Text Files: [std:fstream](https://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-4.2/fstream.html) +- Logger: [Tumpnt Logger](https://github.com/Tumpnt/TumpntAudio/blob/master/src/core/tpnt_log.h) +- Time: [TumbleTime](https://github.com/tumble1999/tumble-time) ## Contributing + Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. ## Todo - - [x] CMake - - [x] Logger - - [x] SDL2 - - [x] GLSL - - [x] Triangle - - [x] Vertex colors - - [x] Indices - - [x] Shader class - - [x] Quad rendering - - [x] Texture mapping - - [x] Uniforms - - [x] Mesh class - - [x] Texture class - - [x] Matricies - - [x] Perspective camera - - [x] 3D cube - - [x] 3D transforms - - [x] WASD - - [x] Basic input handling - - [x] Mouse controlled camera - - [x] Window class - - [x] Resize context on window resize - - [x] Time class - - [x] Camera class - - [x] Smooth input - - [x] Materials - - [x] Render system - - [x] Multiple Objects rendering at the same time - - [x] Mesh importing - - [x] Full UV mapping support - - [x] Full vertex color support - - [ ] Framebuffers - - [ ] Render to texture - - [ ] Fully customizable materials - - [x] Normals - - [ ] Normal maps - - [x] Matcap shader - - [x] Compile as library - - [ ] Depth manipulation - - [ ] Skybox - - [ ] Simple object classes (combine assets and automatically manage rendering (not sure if this should acutally be done)) - - [ ] GL lines - - [ ] Sprites (i think you can do GL_POINTS and draw the images in a frag shader) - - [ ] Supersampling and subsampling - - [ ] Antialiasing - - [ ] MSAA - - [ ] FXAA - - [ ] MSAA with FXAA - - [ ] Mipmaps - - [ ] Anisotropic filtering - - [ ] Texture filtering - - [ ] Nearest - - [ ] Linear - - [ ] Bilinear - - [ ] Trilinear - - [ ] Supersampling / subsampling interpolation - - [ ] Nearest - - [ ] Bilinear - - [ ] Bicubic - - [ ] Trilinear - - [ ] Lanczos - - [ ] Lights - - [ ] Text - - [ ] GUI - - [ ] Portals - - [ ] VR support - - [ ] Port to Windows - - [ ] Port to MacOS - - [ ] Port to Emscripten - - [ ] Port to Android - - [ ] Port to iOS + +- [x] CMake +- [x] Logger +- [x] SDL2 +- [x] GLSL +- [x] Triangle +- [x] Vertex colors +- [x] Indices +- [x] Shader class +- [x] Quad rendering +- [x] Texture mapping +- [x] Uniforms +- [x] Mesh class +- [x] Texture class +- [x] Matricies +- [x] Perspective camera +- [x] 3D cube +- [x] 3D transforms +- [x] WASD +- [x] Basic input handling +- [x] Mouse controlled camera +- [x] Window class +- [x] Resize context on window resize +- [x] Time class +- [x] Camera class +- [x] Smooth input +- [x] Materials +- [x] Render system +- [x] Multiple Objects rendering at the same time +- [x] Mesh importing +- [x] Full UV mapping support +- [x] Full vertex color support +- [ ] Framebuffers +- [ ] Render to texture +- [ ] Fully customizable materials +- [x] Normals +- [ ] Normal maps +- [x] Matcap shader +- [x] Compile as library +- [ ] Depth manipulation +- [ ] Skybox +- [ ] Simple object classes (combine assets and automatically manage rendering (not sure if this should acutally be done)) +- [ ] GL lines +- [ ] Sprites (i think you can do GL_POINTS and draw the images in a frag shader) +- [ ] Supersampling and subsampling +- [ ] Antialiasing + - [ ] MSAA + - [ ] FXAA + - [ ] MSAA with FXAA +- [ ] Mipmaps +- [ ] Anisotropic filtering +- [ ] Texture filtering +- [ ] Nearest +- [ ] Linear +- [ ] Bilinear +- [ ] Trilinear +- [ ] Supersampling / subsampling interpolation + - [ ] Nearest + - [ ] Bilinear + - [ ] Bicubic + - [ ] Trilinear + - [ ] Lanczos +- [ ] Lights +- [ ] Text +- [ ] GUI +- [ ] Portals +- [ ] VR support +- [ ] Port to Windows +- [ ] Port to MacOS +- [ ] Port to Emscripten +- [ ] Port to Android +- [ ] Port to iOS ### Physics engine (make a seperate project) - - [ ] Shapes - - [ ] Point - - [ ] Line segment - - [ ] Rectangular prism - - [ ] Sphere - - [ ] Cylinder - - [ ] Capsule - - [ ] Cone - - [ ] Ngon prism - - [ ] Elipsoid - - [ ] Mesh - - [ ] Shape collision - - [ ] Shape advanced collision (Get information like position, speeds, collision normals, etc. so that physics can be done) - - [ ] Physics - - [ ] Air resistance - - [ ] Friction - - [ ] Bounciness - - [ ] Buoyancy - - [ ] Fake fluid (fluid in small comtainers like bottles, get water level) - - [ ] Soft body - - [ ] Fluid - - [ ] Portals - - [ ] Port to Windows - - [ ] Port to MacOS - - [ ] Port to Emscripten - - [ ] Port to Android - - [ ] Port to iOS +- [ ] Shapes + - [ ] Point + - [ ] Line segment + - [ ] Rectangular prism + - [ ] Sphere + - [ ] Cylinder + - [ ] Capsule + - [ ] Cone + - [ ] Ngon prism + - [ ] Elipsoid + - [ ] Mesh +- [ ] Shape collision +- [ ] Shape advanced collision (Get information like position, speeds, collision normals, etc. so that physics can be done) +- [ ] Physics + - [ ] Air resistance + - [ ] Friction + - [ ] Bounciness + - [ ] Buoyancy + - [ ] Fake fluid (fluid in small comtainers like bottles, get water level) + - [ ] Soft body + - [ ] Fluid +- [ ] Portals +- [ ] Port to Windows +- [ ] Port to MacOS +- [ ] Port to Emscripten +- [ ] Port to Android +- [ ] Port to iOS ### Networking (make a seperate project) - - TODO: Make todo list +- TODO: Make todo list ### SceneGraph (make a seperate project) - - [ ] States - - [ ] Scene Graph - - [ ] Map management - - [ ] XML based scene graph import +- [ ] States +- [ ] Scene Graph +- [ ] Map management +- [ ] XML based scene graph import ### Misc - - [ ] Events System - - [ ] Make an Actual Game \ No newline at end of file +- [ ] Events System +- [ ] Make an Actual Game From f029791d325e6b92087fac485afddd57d2b91d8e Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:33:11 +0100 Subject: [PATCH 015/107] new step --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index fe6dea24..4311599a 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -7,6 +7,6 @@ jobs: debian: runs-on: ubuntu-latest steps: + - uses: cinnabar-engine/cinnabar@feature/gh-actions - run: ./packaging/create-deb.sh shell: bash - uses: cinnabar-engine/cinnabar@feature/gh-actions From 65e0a33627cf1858ac094216037b0d7144a6b833 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:37:01 +0100 Subject: [PATCH 016/107] actions --- .github/workflows/CD.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 4311599a..9196add7 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -4,9 +4,7 @@ on: branches: [feature/gh-actions] workflow_dispatch: jobs: - debian: + packaging: runs-on: ubuntu-latest steps: - uses: cinnabar-engine/cinnabar@feature/gh-actions - - run: ./packaging/create-deb.sh - shell: bash From a15ed3afdeeb8b4c45f9147c7cc9ff99fc59d644 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:37:40 +0100 Subject: [PATCH 017/107] name --- action.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 action.yml diff --git a/action.yml b/action.yml new file mode 100644 index 00000000..753dec49 --- /dev/null +++ b/action.yml @@ -0,0 +1,7 @@ +name: "Packaging" +description: "Greet someone" +runs: + using: "composite" + steps: + - run: ls + shell: bash From bcf87971a44a06a5e8dffc1b36c5ae94af8f7aa8 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:38:45 +0100 Subject: [PATCH 018/107] create-deb --- action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 753dec49..d9e51f78 100644 --- a/action.yml +++ b/action.yml @@ -3,5 +3,5 @@ description: "Greet someone" runs: using: "composite" steps: - - run: ls + - run: ./packaging/create-deb.sh shell: bash From 5a1e8f3ef8da6906ff6746a9f30049aa90e163b5 Mon Sep 17 00:00:00 2001 From: Tumble Date: Sun, 15 Aug 2021 23:40:43 +0100 Subject: [PATCH 019/107] hmm --- action.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/action.yml b/action.yml index d9e51f78..470cdc60 100644 --- a/action.yml +++ b/action.yml @@ -1,7 +1,5 @@ name: "Packaging" -description: "Greet someone" runs: - using: "composite" steps: - run: ./packaging/create-deb.sh shell: bash From cef31a87ceaa525965426f7928a1db95bf5c2cb8 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 00:31:27 +0100 Subject: [PATCH 020/107] CI --- .github/workflows/CD.yml | 23 ++++++++++++++--------- action.yml | 5 ----- 2 files changed, 14 insertions(+), 14 deletions(-) delete mode 100644 action.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 9196add7..7ca3f58d 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,10 +1,15 @@ name: Packaging -on: - push: - branches: [feature/gh-actions] - workflow_dispatch: -jobs: - packaging: - runs-on: ubuntu-latest - steps: - - uses: cinnabar-engine/cinnabar@feature/gh-actions +on: push +packaging: + runs-on: ubuntu-latest + steps + + # Checkout the branch +- name: checkout + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. + +- name: Create Debian Package + run: | + cd packaging + chmod +x ./create-deb.sh + ./create-deb.sh diff --git a/action.yml b/action.yml deleted file mode 100644 index 470cdc60..00000000 --- a/action.yml +++ /dev/null @@ -1,5 +0,0 @@ -name: "Packaging" -runs: - steps: - - run: ./packaging/create-deb.sh - shell: bash From feded89897a4530a7eb8bd25387147b7a612bd59 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 00:32:01 +0100 Subject: [PATCH 021/107] formatting --- .github/workflows/CD.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 7ca3f58d..09661f4b 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -2,14 +2,13 @@ name: Packaging on: push packaging: runs-on: ubuntu-latest - steps + steps: + # Checkout the branch + - name: checkout + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - # Checkout the branch -- name: checkout - uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - -- name: Create Debian Package - run: | - cd packaging - chmod +x ./create-deb.sh - ./create-deb.sh + - name: Create Debian Package + run: | + cd packaging + chmod +x ./create-deb.sh + ./create-deb.sh From 9902ef821c257228a814e2a4b6808312f3b09997 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 00:32:31 +0100 Subject: [PATCH 022/107] jobs --- .github/workflows/CD.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 09661f4b..2f7b86f5 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,14 +1,15 @@ name: Packaging on: push -packaging: - runs-on: ubuntu-latest - steps: - # Checkout the branch - - name: checkout - uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. +jobs: + packaging: + runs-on: ubuntu-latest + steps: + # Checkout the branch + - name: checkout + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - - name: Create Debian Package - run: | - cd packaging - chmod +x ./create-deb.sh - ./create-deb.sh + - name: Create Debian Package + run: | + cd packaging + chmod +x ./create-deb.sh + ./create-deb.sh From 6db347a9f36dce0d4eef7707510b09032f373a40 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 00:35:09 +0100 Subject: [PATCH 023/107] dependacies --- .github/workflows/CD.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 2f7b86f5..9d9d75e6 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -4,6 +4,8 @@ jobs: packaging: runs-on: ubuntu-latest steps: + - name: Install Dependacies + run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev # Checkout the branch - name: checkout uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. From 33ba20308b904162a14e99525410409bcedf06a6 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 00:49:59 +0100 Subject: [PATCH 024/107] arch and ppa --- .github/workflows/CD.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 9d9d75e6..87ceb3a2 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -15,3 +15,22 @@ jobs: cd packaging chmod +x ./create-deb.sh ./create-deb.sh + + - name: Create Arch Package + run: | + cd packaging + chmod +x ./create-arch.sh + ./create-arch.sh + + - name: Publish Packages + run: | + git config --global user.email "octokit@github.com" + git config --global user.name "Github Actions" + mkdir -p /tmp/ppa + git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io /tmp/ppa + cp ./packaging/*.deb /tmp/ppa/debian + cp ./packaging/*.pkg.tar.zst /tmp/ppa/arch + cd /tmp/ppa + git add . + git commit -am "Package Update" + git push From a4905516a8280e1178454940472689288adda34d Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 00:55:47 +0100 Subject: [PATCH 025/107] mp --- .github/workflows/CD.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 87ceb3a2..9363b67b 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -31,6 +31,14 @@ jobs: cp ./packaging/*.deb /tmp/ppa/debian cp ./packaging/*.pkg.tar.zst /tmp/ppa/arch cd /tmp/ppa - git add . - git commit -am "Package Update" - git push + + - name: Push directory to another repos + uses: vinayb21/github-action-push-to-another-repo@1.4.0 + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + with: + source-directory: "/tmp/ppa" + destination-github-username: "cinnabar-engine" + destination-repository-name: "cinnabar-engine.github.io " + user-email: octokit@github.com + commit-message: "Package Update" From e8168696767f97b2bf1e8f980043367288a4b9a4 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 00:58:22 +0100 Subject: [PATCH 026/107] fix url --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 9363b67b..b974318c 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -39,6 +39,6 @@ jobs: with: source-directory: "/tmp/ppa" destination-github-username: "cinnabar-engine" - destination-repository-name: "cinnabar-engine.github.io " + destination-repository-name: "cinnabar-engine.github.io" user-email: octokit@github.com commit-message: "Package Update" From 105f847beda53a9e186c5ef5658636b9f55b8f3a Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:03:15 +0100 Subject: [PATCH 027/107] change of src dir --- .github/workflows/CD.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index b974318c..2324ed2c 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -24,12 +24,12 @@ jobs: - name: Publish Packages run: | - git config --global user.email "octokit@github.com" - git config --global user.name "Github Actions" - mkdir -p /tmp/ppa - git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io /tmp/ppa - cp ./packaging/*.deb /tmp/ppa/debian - cp ./packaging/*.pkg.tar.zst /tmp/ppa/arch + # git config --global user.email "octokit@github.com" + # git config --global user.name "Github Actions" + mkdir -p ./ppa/{debian,arch} + #git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io /tmp/ppa + cp ./packaging/*.deb ./ppa/debian + cp ./packaging/*.pkg.tar.zst ./ppa/arch cd /tmp/ppa - name: Push directory to another repos @@ -37,7 +37,7 @@ jobs: env: API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} with: - source-directory: "/tmp/ppa" + source-directory: "./ppa" destination-github-username: "cinnabar-engine" destination-repository-name: "cinnabar-engine.github.io" user-email: octokit@github.com From d9d50c69be27f1a4e00ef153ced95db2e1dc40f5 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:05:59 +0100 Subject: [PATCH 028/107] no cd --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 2324ed2c..81e59809 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -30,7 +30,7 @@ jobs: #git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io /tmp/ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch - cd /tmp/ppa + #cd /tmp/ppa - name: Push directory to another repos uses: vinayb21/github-action-push-to-another-repo@1.4.0 From ec5064304fa417667ca1369127c7bd7cd0a18ae4 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:09:13 +0100 Subject: [PATCH 029/107] bring back clone --- .github/workflows/CD.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 81e59809..f2685aeb 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -24,13 +24,9 @@ jobs: - name: Publish Packages run: | - # git config --global user.email "octokit@github.com" - # git config --global user.name "Github Actions" - mkdir -p ./ppa/{debian,arch} - #git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io /tmp/ppa + git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch - #cd /tmp/ppa - name: Push directory to another repos uses: vinayb21/github-action-push-to-another-repo@1.4.0 From 0668baed3d30988c279203af5c3fd38436c80a07 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:12:01 +0100 Subject: [PATCH 030/107] ii guess i have to tag --- .github/workflows/CD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index f2685aeb..3ed4632b 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -38,3 +38,4 @@ jobs: destination-repository-name: "cinnabar-engine.github.io" user-email: octokit@github.com commit-message: "Package Update" + tag: "1" From 3bfc8d3f953ddb491b6338d8e74fa8513fdc44cf Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:15:11 +0100 Subject: [PATCH 031/107] hmm --- .github/workflows/CD.yml | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 3ed4632b..855bba09 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -24,18 +24,25 @@ jobs: - name: Publish Packages run: | + git config --global user.email "octokit@github.com" + git config --global user.name "Github Actions" + mkdir -p /tmp/ppa git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch + cd ./ppa + git add . + git commit -am "Package Update" + git push - - name: Push directory to another repos - uses: vinayb21/github-action-push-to-another-repo@1.4.0 - env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} - with: - source-directory: "./ppa" - destination-github-username: "cinnabar-engine" - destination-repository-name: "cinnabar-engine.github.io" - user-email: octokit@github.com - commit-message: "Package Update" - tag: "1" + # - name: Push directory to another repos + # uses: vinayb21/github-action-push-to-another-repo@1.4.0 + # env: + # API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + # with: + # source-directory: "./ppa" + # destination-github-username: "cinnabar-engine" + # destination-repository-name: "cinnabar-engine.github.io" + # user-email: octokit@github.com + # commit-message: "Package Update" + # tag: "1" From 48cca10bd4b4e7ddbba9259afa85e26778c63c2e Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:19:45 +0100 Subject: [PATCH 032/107] api token --- .github/workflows/CD.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 855bba09..1aa9505b 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -27,11 +27,12 @@ jobs: git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone https://$API_TOKEN_GITHUB@github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch cd ./ppa git add . + git status git commit -am "Package Update" git push From ffd5bdb6b197d114d6184b204e86d1f58cb6b3d6 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:24:55 +0100 Subject: [PATCH 033/107] username --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 1aa9505b..ce5b20e4 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -27,7 +27,7 @@ jobs: git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone https://$API_TOKEN_GITHUB@github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone $API_TOKEN_GITHUB@github.com:cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch cd ./ppa From 7077edc6e97d007450a90161ff2183b00582c68f Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:27:26 +0100 Subject: [PATCH 034/107] git --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index ce5b20e4..ad5c7086 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -27,7 +27,7 @@ jobs: git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone $API_TOKEN_GITHUB@github.com:cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone git@github.com:cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch cd ./ppa From 0df2ae07594bee5446ad5ae3f3b7c5d1507a4a7c Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:43:02 +0100 Subject: [PATCH 035/107] git --- .github/workflows/CD.yml | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index ad5c7086..6eec1ca5 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -27,14 +27,27 @@ jobs: git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone git@github.com:cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch - cd ./ppa - git add . - git status - git commit -am "Package Update" - git push + # cd ./ppa + # git add . + # git status + # git commit -am "Package Update" + # git push + + - name: Pushes to another repository + id: push_directory + uses: cpina/github-action-push-to-another-repository@main + env: + API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + with: + source-directory: "ppa" + destination-github-username: "cinnabar-engine" + destination-repository-name: "cinnabar-engine.github.i" + user-email: octokit@github.com + commit-message: Package Update ($GITHUB_REF) + target-branch: main # - name: Push directory to another repos # uses: vinayb21/github-action-push-to-another-repo@1.4.0 From cbd35848bc71acd5be33beae4518b9b97415d38e Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:45:17 +0100 Subject: [PATCH 036/107] url --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 6eec1ca5..7454bff6 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -44,7 +44,7 @@ jobs: with: source-directory: "ppa" destination-github-username: "cinnabar-engine" - destination-repository-name: "cinnabar-engine.github.i" + destination-repository-name: "cinnabar-engine.github.io" user-email: octokit@github.com commit-message: Package Update ($GITHUB_REF) target-branch: main From 9def3aabebbc339737f3e963942edc882b2445f7 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 01:48:03 +0100 Subject: [PATCH 037/107] branch --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 7454bff6..1c57134a 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -47,7 +47,7 @@ jobs: destination-repository-name: "cinnabar-engine.github.io" user-email: octokit@github.com commit-message: Package Update ($GITHUB_REF) - target-branch: main + target-branch: master # - name: Push directory to another repos # uses: vinayb21/github-action-push-to-another-repo@1.4.0 From 0c6b2087f3c79d4b736af8016baa9a27500c9977 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 02:00:20 +0100 Subject: [PATCH 038/107] key --- .github/workflows/CD.yml | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 1c57134a..b35940b4 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -40,7 +40,7 @@ jobs: id: push_directory uses: cpina/github-action-push-to-another-repository@main env: - API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} + API_TOKEN_GITHUB: ${{ secrets.GH_KEY }} with: source-directory: "ppa" destination-github-username: "cinnabar-engine" @@ -48,15 +48,3 @@ jobs: user-email: octokit@github.com commit-message: Package Update ($GITHUB_REF) target-branch: master - - # - name: Push directory to another repos - # uses: vinayb21/github-action-push-to-another-repo@1.4.0 - # env: - # API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }} - # with: - # source-directory: "./ppa" - # destination-github-username: "cinnabar-engine" - # destination-repository-name: "cinnabar-engine.github.io" - # user-email: octokit@github.com - # commit-message: "Package Update" - # tag: "1" From df48acf3211237050d0a4a5b18dec6f7ac944bea Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 02:09:27 +0100 Subject: [PATCH 039/107] hmm --- .github/workflows/CD.yml | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index b35940b4..e2a2dc72 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -23,28 +23,30 @@ jobs: ./create-arch.sh - name: Publish Packages + env: + API_TOKEN_GITHUB: ${{ secrets.GH_KEY }} run: | git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone https://git:$API_TOKEN_GITHUB@github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch - # cd ./ppa - # git add . - # git status - # git commit -am "Package Update" - # git push + cd ./ppa + git add . + git status + git commit -am "Package Update" + git push - - name: Pushes to another repository - id: push_directory - uses: cpina/github-action-push-to-another-repository@main - env: - API_TOKEN_GITHUB: ${{ secrets.GH_KEY }} - with: - source-directory: "ppa" - destination-github-username: "cinnabar-engine" - destination-repository-name: "cinnabar-engine.github.io" - user-email: octokit@github.com - commit-message: Package Update ($GITHUB_REF) - target-branch: master + # - name: Pushes to another repository + # id: push_directory + # uses: cpina/github-action-push-to-another-repository@main + # env: + # API_TOKEN_GITHUB: ${{ secrets.GH_KEY }} + # with: + # source-directory: "ppa" + # destination-github-username: "cinnabar-engine" + # destination-repository-name: "cinnabar-engine.github.io" + # user-email: octokit@github.com + # commit-message: Package Update ($GITHUB_REF) + # target-branch: master From a61070100abd31a134d35556335dcd71c30349e3 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 02:12:17 +0100 Subject: [PATCH 040/107] hmm --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index e2a2dc72..64671507 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -29,7 +29,7 @@ jobs: git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone https://git:$API_TOKEN_GITHUB@github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone https://tumble1999:$API_TOKEN_GITHUB@github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch cd ./ppa From 702bc619d5fa8580319467dc726ba7ee178afbc0 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 02:16:42 +0100 Subject: [PATCH 041/107] hmm --- .github/workflows/CD.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 64671507..e74b0b67 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -24,12 +24,12 @@ jobs: - name: Publish Packages env: - API_TOKEN_GITHUB: ${{ secrets.GH_KEY }} + GH_KEY: ${{ secrets.GH_KEY }} run: | git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone https://tumble1999:$API_TOKEN_GITHUB@github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone https://tumble1999:$GH_KEY@github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch cd ./ppa From 776b1b48cd94ef7929a93abc5c1cba98924329bb Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 02:46:21 +0100 Subject: [PATCH 042/107] possible auth --- .github/workflows/CD.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index e74b0b67..7ba94e96 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -29,14 +29,16 @@ jobs: git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone https://tumble1999:$GH_KEY@github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch cd ./ppa git add . git status git commit -am "Package Update" - git push + echo "tumble1999 + $GH_KEY + "|git push # - name: Pushes to another repository # id: push_directory From c4b22bb2e70bd98a7145619252834090a663fe69 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 02:51:23 +0100 Subject: [PATCH 043/107] possible auth --- .github/workflows/CD.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 7ba94e96..1f543e70 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -29,16 +29,14 @@ jobs: git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone git@github.com:cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch cd ./ppa git add . git status git commit -am "Package Update" - echo "tumble1999 - $GH_KEY - "|git push + git push # - name: Pushes to another repository # id: push_directory From c00197209ab4b2e830a331802461c6da2150f563 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 02:59:56 +0100 Subject: [PATCH 044/107] possible auth --- .github/workflows/CD.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 1f543e70..83390490 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -23,13 +23,13 @@ jobs: ./create-arch.sh - name: Publish Packages - env: - GH_KEY: ${{ secrets.GH_KEY }} + # env: + # GH_KEY: ${{ secrets.GH_KEY }} run: | git config --global user.email "octokit@github.com" git config --global user.name "Github Actions" mkdir -p /tmp/ppa - git clone git@github.com:cinnabar-engine/cinnabar-engine.github.io ./ppa + git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa cp ./packaging/*.deb ./ppa/debian cp ./packaging/*.pkg.tar.zst ./ppa/arch cd ./ppa From 53f00b5d85587622f5d2393be38d3aa1e3e29c78 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 11:47:39 +0100 Subject: [PATCH 045/107] some unit tests --- .github/workflows/UnitTests.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/UnitTests.yml diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml new file mode 100644 index 00000000..9ba4d74c --- /dev/null +++ b/.github/workflows/UnitTests.yml @@ -0,0 +1,21 @@ +name: Packaging +on: push +jobs: + debian: + runs-on: ubuntu-latest + steps: + - name: Install Dependacies + run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev + # Checkout the branch + - name: checkout + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. + + - name: Configure + run: | + mkdir build + cd build + cmake .. + + - name: Build + run: | + cmake --build ./build From d715af32d80060921537e6b057f3d06757de16fd Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 11:48:00 +0100 Subject: [PATCH 046/107] some unit tests --- .github/workflows/UnitTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 9ba4d74c..93115188 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -1,4 +1,4 @@ -name: Packaging +name: UnitTests on: push jobs: debian: From f62e8b2929e71a7a051899d46aa5a7400c7049b8 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 11:48:09 +0100 Subject: [PATCH 047/107] some unit tests --- .github/workflows/UnitTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 93115188..a5d06009 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -1,4 +1,4 @@ -name: UnitTests +name: Unit Testing on: push jobs: debian: From 9b50c3751b828c3a601016d4d7158dec6ad58600 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 11:49:16 +0100 Subject: [PATCH 048/107] disable CD --- .github/workflows/CD.yml | 52 ---------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 .github/workflows/CD.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml deleted file mode 100644 index 83390490..00000000 --- a/.github/workflows/CD.yml +++ /dev/null @@ -1,52 +0,0 @@ -name: Packaging -on: push -jobs: - packaging: - runs-on: ubuntu-latest - steps: - - name: Install Dependacies - run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev - # Checkout the branch - - name: checkout - uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - - - name: Create Debian Package - run: | - cd packaging - chmod +x ./create-deb.sh - ./create-deb.sh - - - name: Create Arch Package - run: | - cd packaging - chmod +x ./create-arch.sh - ./create-arch.sh - - - name: Publish Packages - # env: - # GH_KEY: ${{ secrets.GH_KEY }} - run: | - git config --global user.email "octokit@github.com" - git config --global user.name "Github Actions" - mkdir -p /tmp/ppa - git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa - cp ./packaging/*.deb ./ppa/debian - cp ./packaging/*.pkg.tar.zst ./ppa/arch - cd ./ppa - git add . - git status - git commit -am "Package Update" - git push - - # - name: Pushes to another repository - # id: push_directory - # uses: cpina/github-action-push-to-another-repository@main - # env: - # API_TOKEN_GITHUB: ${{ secrets.GH_KEY }} - # with: - # source-directory: "ppa" - # destination-github-username: "cinnabar-engine" - # destination-repository-name: "cinnabar-engine.github.io" - # user-email: octokit@github.com - # commit-message: Package Update ($GITHUB_REF) - # target-branch: master From 9beef0b2effe8f2e52a0b7b6d0c55550907ee33d Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 11:50:01 +0100 Subject: [PATCH 049/107] added badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9ec1b276..4e0f8a3c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Cinnabar Engine -[![.github/workflows/CD.yml](https://github.com/cinnabar-engine/cinnabar/actions/workflows/CD.yml/badge.svg)](https://github.com/cinnabar-engine/cinnabar/actions/workflows/CD.yml) +[![Unit Testing](https://github.com/cinnabar-engine/cinnabar/actions/workflows/UnitTests.yml/badge.svg)](https://github.com/cinnabar-engine/cinnabar/actions/workflows/UnitTests.yml) ## Prerequisites From 0848aba1fcd3e041ab54f93bfe76335403fd9a96 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 11:51:00 +0100 Subject: [PATCH 050/107] remove checkout --- .github/workflows/UnitTests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index a5d06009..199cf9cb 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -6,9 +6,6 @@ jobs: steps: - name: Install Dependacies run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev - # Checkout the branch - - name: checkout - uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Configure run: | From 1e0bd779ab305a8a32c9188f6f40dbf99688b1ba Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 11:54:33 +0100 Subject: [PATCH 051/107] checkout the current branch --- .github/workflows/UnitTests.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 199cf9cb..8a46f277 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -6,6 +6,9 @@ jobs: steps: - name: Install Dependacies run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev + # Checkout the branch + - name: Checkout Branch + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Configure run: | From e704a000de9affec14a353543ad54ee390412e00 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 12:11:19 +0100 Subject: [PATCH 052/107] arch testing --- .github/workflows/CD.yml.disabled | 52 +++++++++++++++++++++++++++++++ .github/workflows/UnitTests.yml | 25 ++++++++++++++- .gitignore | 3 +- arch/dockerfile | 5 +-- packaging/create-arch.sh | 1 + 5 files changed, 82 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/CD.yml.disabled diff --git a/.github/workflows/CD.yml.disabled b/.github/workflows/CD.yml.disabled new file mode 100644 index 00000000..83390490 --- /dev/null +++ b/.github/workflows/CD.yml.disabled @@ -0,0 +1,52 @@ +name: Packaging +on: push +jobs: + packaging: + runs-on: ubuntu-latest + steps: + - name: Install Dependacies + run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev + # Checkout the branch + - name: checkout + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. + + - name: Create Debian Package + run: | + cd packaging + chmod +x ./create-deb.sh + ./create-deb.sh + + - name: Create Arch Package + run: | + cd packaging + chmod +x ./create-arch.sh + ./create-arch.sh + + - name: Publish Packages + # env: + # GH_KEY: ${{ secrets.GH_KEY }} + run: | + git config --global user.email "octokit@github.com" + git config --global user.name "Github Actions" + mkdir -p /tmp/ppa + git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa + cp ./packaging/*.deb ./ppa/debian + cp ./packaging/*.pkg.tar.zst ./ppa/arch + cd ./ppa + git add . + git status + git commit -am "Package Update" + git push + + # - name: Pushes to another repository + # id: push_directory + # uses: cpina/github-action-push-to-another-repository@main + # env: + # API_TOKEN_GITHUB: ${{ secrets.GH_KEY }} + # with: + # source-directory: "ppa" + # destination-github-username: "cinnabar-engine" + # destination-repository-name: "cinnabar-engine.github.io" + # user-email: octokit@github.com + # commit-message: Package Update ($GITHUB_REF) + # target-branch: master diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 8a46f277..985405d9 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -1,7 +1,7 @@ name: Unit Testing on: push jobs: - debian: + Linux-Debian-Ubuntu: runs-on: ubuntu-latest steps: - name: Install Dependacies @@ -19,3 +19,26 @@ jobs: - name: Build run: | cmake --build ./build + Linux-Arch: + run-on: ubuntu-latest + steps: + # Checkout the branch + - name: Checkout Branch + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. + - name: Install Dependacies + run: | + cp ./arch/dockerfile . + sudo docker build . -t cinnabar-arch + sudo docker run cinnabar-arch + + - name: Configure + run: | + sudo docker run cinnabar-arch cd /app + sudo docker run cinnabar-arch mkdir build + sudo docker run cinnabar-arch cd build + sudo docker run cinnabar-arch cmake .. + + - name: Build + run: | + sudo docker run cinnabar-arch cd /app + sudo docker run cinnabar-arch cmake --build ./build diff --git a/.gitignore b/.gitignore index adb3c3d3..57c62318 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ build/ packaging/* - +dockerfile +!*/dockerfile !packaging/*.sh \ No newline at end of file diff --git a/arch/dockerfile b/arch/dockerfile index 57b38373..14abc299 100644 --- a/arch/dockerfile +++ b/arch/dockerfile @@ -1,7 +1,8 @@ FROM archlinux RUN pacman -Syu --noconfirm && pacman -S base-devel sdl2 glew glm assimp --noconfirm --needed -COPY . /packaging +COPY . /app +RUN ln -s /app /packaging RUN chown nobody:nobody /packaging -R && chmod 755 /packaging -R USER nobody -RUN /packaging/create-arch.sh docker +#RUN /packaging/create-arch.sh docker #CMD bash -c "/app/create-arch.sh $@" docker >> /proc/1/fd/1 \ No newline at end of file diff --git a/packaging/create-arch.sh b/packaging/create-arch.sh index 02b8548b..9b1c8236 100755 --- a/packaging/create-arch.sh +++ b/packaging/create-arch.sh @@ -70,6 +70,7 @@ then cp ../arch/dockerfile . sudo docker build . -t cinnabar-arch + sudo docker run cinnabar-arch /packaging/create-arch.sh sudo docker run --rm cinnabar-arch tar -cC /packaging/pkg . | tar -xC . rm dockerfile rm -rf */ From 04c0ad2251ae130c868602b7e10d143f90f001d9 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 12:14:49 +0100 Subject: [PATCH 053/107] runs-on no run-on --- .github/workflows/UnitTests.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 985405d9..7e7885d0 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -20,9 +20,8 @@ jobs: run: | cmake --build ./build Linux-Arch: - run-on: ubuntu-latest + runs-on: ubuntu-latest steps: - # Checkout the branch - name: Checkout Branch uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Install Dependacies From b36f178dde8ab956cec2d8a4a75cea02e70c24d9 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 12:15:43 +0100 Subject: [PATCH 054/107] rename --- .github/workflows/UnitTests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 7e7885d0..85731aec 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -1,7 +1,7 @@ name: Unit Testing on: push jobs: - Linux-Debian-Ubuntu: + Debian: runs-on: ubuntu-latest steps: - name: Install Dependacies @@ -19,7 +19,7 @@ jobs: - name: Build run: | cmake --build ./build - Linux-Arch: + Arch: runs-on: ubuntu-latest steps: - name: Checkout Branch From 1e770b48630a00f5aed1c13ba6cf199d9a08a198 Mon Sep 17 00:00:00 2001 From: Tumble Date: Mon, 16 Aug 2021 12:17:26 +0100 Subject: [PATCH 055/107] hmm --- .github/workflows/UnitTests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 85731aec..5d96debc 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -26,6 +26,7 @@ jobs: uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Install Dependacies run: | + echo ${{ github.repository }} ${{ github.branch }} cp ./arch/dockerfile . sudo docker build . -t cinnabar-arch sudo docker run cinnabar-arch From 2042611466f816dc9243af5aad848b527e4fdf10 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:07:26 +0100 Subject: [PATCH 056/107] debian test --- .github/workflows/UnitTests.yml | 8 +-- .gitignore | 3 +- arch/dockerfile => arch.dockerfile | 4 +- packaging/create-arch.sh | 9 ++- tests/arch.sh | 94 ++++++++++++++++++++++++++++++ tests/debian.sh | 88 ++++++++++++++++++++++++++++ 6 files changed, 192 insertions(+), 14 deletions(-) rename arch/dockerfile => arch.dockerfile (71%) create mode 100644 tests/arch.sh create mode 100755 tests/debian.sh diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 5d96debc..0a6b3c8e 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -12,13 +12,10 @@ jobs: - name: Configure run: | - mkdir build - cd build - cmake .. - + tests/debian.sh configure - name: Build run: | - cmake --build ./build + tests/debian.sh build Arch: runs-on: ubuntu-latest steps: @@ -26,7 +23,6 @@ jobs: uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Install Dependacies run: | - echo ${{ github.repository }} ${{ github.branch }} cp ./arch/dockerfile . sudo docker build . -t cinnabar-arch sudo docker run cinnabar-arch diff --git a/.gitignore b/.gitignore index 57c62318..60ea205f 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ packaging/* dockerfile !*/dockerfile -!packaging/*.sh \ No newline at end of file +!packaging/*.sh +pkg \ No newline at end of file diff --git a/arch/dockerfile b/arch.dockerfile similarity index 71% rename from arch/dockerfile rename to arch.dockerfile index 14abc299..a55fab52 100644 --- a/arch/dockerfile +++ b/arch.dockerfile @@ -1,8 +1,8 @@ FROM archlinux RUN pacman -Syu --noconfirm && pacman -S base-devel sdl2 glew glm assimp --noconfirm --needed COPY . /app -RUN ln -s /app /packaging -RUN chown nobody:nobody /packaging -R && chmod 755 /packaging -R +RUN chown nobody:nobody /app -R && chmod 777 /a -R USER nobody +RUN cd app #RUN /packaging/create-arch.sh docker #CMD bash -c "/app/create-arch.sh $@" docker >> /proc/1/fd/1 \ No newline at end of file diff --git a/packaging/create-arch.sh b/packaging/create-arch.sh index 9b1c8236..9bde8727 100755 --- a/packaging/create-arch.sh +++ b/packaging/create-arch.sh @@ -63,15 +63,14 @@ then prep_arch render fi -cd packaging - if [ "$(cat /etc/os-release | grep ^ID | sed 's/ID=//g')" != "arch" ] then - cp ../arch/dockerfile . - sudo docker build . -t cinnabar-arch +cd packaging +else + sudo docker build -t cinnabar-arch -f arch.dockerfile . sudo docker run cinnabar-arch /packaging/create-arch.sh - sudo docker run --rm cinnabar-arch tar -cC /packaging/pkg . | tar -xC . + sudo docker run --rm cinnabar-arch tar -cC /app/packaging/pkg . | tar -xC . rm dockerfile rm -rf */ exit diff --git a/tests/arch.sh b/tests/arch.sh new file mode 100644 index 00000000..4c41992b --- /dev/null +++ b/tests/arch.sh @@ -0,0 +1,94 @@ + + +function configure { + rm -rf build + mkdir build + cd build + cmake .. +} + +function build { + cmake --build. ./build --target clean + cmake --build. ./build + +} + + + + + +function prep_arch { #(TARGET) + TARGET=$1 + NAME=cinnabar-$1 + + PAKNAME=$NAME + ARCH=./arch/$TARGET + + LIB=./build/run/lib$PAKNAME.so + INCLUDE=./src/cinnabar-engine/$TARGET + + PKGROOT=./pkg/$PAKNAME/pkg/$PAKNAME + + mkdir -p packaging/${PAKNAME}/include + + cp -r ${ARCH}/* pkg/${PAKNAME} + + # runtime + cp ${LIB} pkg/${PAKNAME} + + #dev + cp -r ${INCLUDE}/*.hpp pkg/${PAKNAME}/include + cp -r ${INCLUDE}/*.h pkg/${PAKNAME}/include + if [ -f pkg/${PAKNAME}/include/stb_image.h ] + then + rm pkg/${PAKNAME}/include/stb_image.h + fi +} + + +function apkg-arch { + cd $1 + makepkg + cd .. +} + +function package { + rm -rf pkg + mkdir pkg + + prep_arch core + prep_arch render + + cd pkg + + for a in "./"*/ + do + apkg-arch $(basename $a) + done + +} + +# set -x +cd $(dirname $0)/.. +case $1 in + + configure) + configure + ;; + + build) + build + ;; + + package) + package + ;; +*) +echo "usage: $0 [action] + +actions: + configure + build + package" +esac + diff --git a/tests/debian.sh b/tests/debian.sh new file mode 100755 index 00000000..550063f8 --- /dev/null +++ b/tests/debian.sh @@ -0,0 +1,88 @@ + + +function configure { + rm -rf build + mkdir build + cd build + cmake .. +} + +function build { + cmake --build ./build --target clean + cmake --build ./build --target cinnabar-core + cmake --build ./build --target cinnabar-render + +} + +function prep_deb { #(TARGET) + TARGET=$1 + NAME=cinnabar-$1 + + PAKNAME=lib$NAME + DEBIAN=./debian/$TARGET/runtime + + PAKNAMEDEV=$PAKNAME-dev + DEBIANDEV=./debian/$TARGET/dev + + LIB=./build/run/$PAKNAME.so + INCLUDE=./src/cinnabar-engine/$TARGET + + rm -rf pkg/${PAKNAME} + rm -rf pkg/${PAKNAMEDEV} + mkdir -p pkg/${PAKNAME}/{DEBIAN,usr/lib} + mkdir -p pkg/${PAKNAMEDEV}/{DEBIAN,usr/include/$NAME} + + cp -r ${DEBIAN}/* pkg/${PAKNAME}/DEBIAN + cp ${LIB} pkg/${PAKNAME}/usr/lib + + + cp -r ${DEBIANDEV}/* pkg/${PAKNAMEDEV}/DEBIAN + cp -r ${INCLUDE}/*.hpp pkg/${PAKNAMEDEV}/usr/include/${NAME} + cp -r ${INCLUDE}/*.h pkg/${PAKNAMEDEV}/usr/include/${NAME} + if [ -f pkg/${PAKNAMEDEV}/usr/include/${NAME}/stb_image.h ] + then + rm pkg/${PAKNAMEDEV}/usr/include/${NAME}/stb_image.h + fi + +} + +function package { + rm -rf pkg + + prep_deb core + prep_deb render + + cd pkg + + for a in "./"*/ + do + dpkg-deb --build $(basename $a) + done + + rm -rf */ +} + +set -x +cd $(dirname $0)/.. +case $1 in + + configure) + configure + ;; + + build) + build + ;; + + package) + package + ;; +*) +echo "usage: $0 [action] + +actions: + configure + build + package" +esac + From d050628447f0ef57feb7f28eb4a376b75accdbb6 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:10:18 +0100 Subject: [PATCH 057/107] debian package test --- .github/workflows/UnitTests.yml | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 0a6b3c8e..efa1500d 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -16,6 +16,10 @@ jobs: - name: Build run: | tests/debian.sh build + + - name: Packaging + run: | + tests/debian.sh package Arch: runs-on: ubuntu-latest steps: @@ -23,18 +27,17 @@ jobs: uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Install Dependacies run: | - cp ./arch/dockerfile . - sudo docker build . -t cinnabar-arch - sudo docker run cinnabar-arch + sudo docker build -f arch.dockerfile . -t ce-arch + sudo docker run ce-arch - name: Configure run: | - sudo docker run cinnabar-arch cd /app - sudo docker run cinnabar-arch mkdir build - sudo docker run cinnabar-arch cd build - sudo docker run cinnabar-arch cmake .. + sudo docker run ce-arch cd /app + sudo docker run ce-arch mkdir build + sudo docker run ce-arch cd build + sudo docker run ce-arch cmake .. - name: Build run: | - sudo docker run cinnabar-arch cd /app - sudo docker run cinnabar-arch cmake --build ./build + sudo docker run ce-arch cd /app + sudo docker run ce-arch cmake --build ./build From 4bb667b10b5037f959da819f8880492cf7eda451 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:13:59 +0100 Subject: [PATCH 058/107] arch test --- .github/workflows/UnitTests.yml | 26 +++++++++++++------------- arch.dockerfile | 2 +- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index efa1500d..bacaf6df 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -4,12 +4,12 @@ jobs: Debian: runs-on: ubuntu-latest steps: - - name: Install Dependacies - run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev - # Checkout the branch - name: Checkout Branch uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. + - name: Install Dependacies + run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev + - name: Configure run: | tests/debian.sh configure @@ -17,7 +17,7 @@ jobs: run: | tests/debian.sh build - - name: Packaging + - name: Package run: | tests/debian.sh package Arch: @@ -25,19 +25,19 @@ jobs: steps: - name: Checkout Branch uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - - name: Install Dependacies + + - name: Install Dependencies run: | - sudo docker build -f arch.dockerfile . -t ce-arch - sudo docker run ce-arch + sudo docker build -f arch.dockerfile -t ce-arch . - name: Configure run: | - sudo docker run ce-arch cd /app - sudo docker run ce-arch mkdir build - sudo docker run ce-arch cd build - sudo docker run ce-arch cmake .. + sudo docker run ce-arch /apps/test/arch.sh configure - name: Build run: | - sudo docker run ce-arch cd /app - sudo docker run ce-arch cmake --build ./build + sudo docker run ce-arch /apps/test/arch.sh build + + - name: Package + run: | + sudo docker run ce-arch /apps/test/arch.sh package diff --git a/arch.dockerfile b/arch.dockerfile index a55fab52..e6124e4a 100644 --- a/arch.dockerfile +++ b/arch.dockerfile @@ -1,7 +1,7 @@ FROM archlinux RUN pacman -Syu --noconfirm && pacman -S base-devel sdl2 glew glm assimp --noconfirm --needed COPY . /app -RUN chown nobody:nobody /app -R && chmod 777 /a -R +RUN chown nobody:nobody /app -R && chmod 777 /apps -R USER nobody RUN cd app #RUN /packaging/create-arch.sh docker From 8f631e329046c39100e4a9d8c3493f5694c35e70 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:18:09 +0100 Subject: [PATCH 059/107] arch --- arch.dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch.dockerfile b/arch.dockerfile index e6124e4a..b920bee3 100644 --- a/arch.dockerfile +++ b/arch.dockerfile @@ -1,7 +1,7 @@ FROM archlinux RUN pacman -Syu --noconfirm && pacman -S base-devel sdl2 glew glm assimp --noconfirm --needed COPY . /app -RUN chown nobody:nobody /app -R && chmod 777 /apps -R +RUN chown nobody:nobody /app -R && chmod 777 /app -R USER nobody RUN cd app #RUN /packaging/create-arch.sh docker From 5e5b44380cbdc8ef54d1da1f678e944db0671827 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:19:47 +0100 Subject: [PATCH 060/107] folder spelt wrong --- .github/workflows/UnitTests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index bacaf6df..d28f6f66 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -32,12 +32,12 @@ jobs: - name: Configure run: | - sudo docker run ce-arch /apps/test/arch.sh configure + sudo docker run ce-arch /apps/tests/arch.sh configure - name: Build run: | - sudo docker run ce-arch /apps/test/arch.sh build + sudo docker run ce-arch /apps/tests/arch.sh build - name: Package run: | - sudo docker run ce-arch /apps/test/arch.sh package + sudo docker run ce-arch /apps/tests/arch.sh package From 41dfcc3fd19a8a5bd2243a3d0cf99d0283fe1365 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:21:19 +0100 Subject: [PATCH 061/107] folder spelt wrong --- .github/workflows/UnitTests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index d28f6f66..3370a20a 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -32,12 +32,12 @@ jobs: - name: Configure run: | - sudo docker run ce-arch /apps/tests/arch.sh configure + sudo docker run ce-arch /app/tests/arch.sh configure - name: Build run: | - sudo docker run ce-arch /apps/tests/arch.sh build + sudo docker run ce-arch /app/tests/arch.sh build - name: Package run: | - sudo docker run ce-arch /apps/tests/arch.sh package + sudo docker run ce-arch /app/tests/arch.sh package From d09454833b2533f63c4eb6207043a07278100e6b Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:36:20 +0100 Subject: [PATCH 062/107] forget shebang --- arch.dockerfile | 2 +- tests/arch.sh | 10 ++++++---- tests/debian.sh | 2 +- tests/windows.bat | 28 ++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 tests/windows.bat diff --git a/arch.dockerfile b/arch.dockerfile index b920bee3..6c2b1e68 100644 --- a/arch.dockerfile +++ b/arch.dockerfile @@ -1,5 +1,5 @@ FROM archlinux -RUN pacman -Syu --noconfirm && pacman -S base-devel sdl2 glew glm assimp --noconfirm --needed +RUN pacman -Syu --noconfirm && pacman -S base-devel cmake sdl2 glew glm assimp --noconfirm --needed COPY . /app RUN chown nobody:nobody /app -R && chmod 777 /app -R USER nobody diff --git a/tests/arch.sh b/tests/arch.sh index 4c41992b..305756ef 100644 --- a/tests/arch.sh +++ b/tests/arch.sh @@ -1,4 +1,4 @@ - +#!/bin/bash function configure { rm -rf build @@ -8,9 +8,9 @@ function configure { } function build { - cmake --build. ./build --target clean - cmake --build. ./build - + cmake --build ./build --target clean + cmake --build ./build --target cinnabar-core + cmake --build ./build --target cinnabar-render } @@ -70,6 +70,8 @@ function package { # set -x cd $(dirname $0)/.. +ls + case $1 in configure) diff --git a/tests/debian.sh b/tests/debian.sh index 550063f8..0b7fb669 100755 --- a/tests/debian.sh +++ b/tests/debian.sh @@ -1,4 +1,4 @@ - +#!/bin/bash function configure { rm -rf build diff --git a/tests/windows.bat b/tests/windows.bat new file mode 100644 index 00000000..49d9a909 --- /dev/null +++ b/tests/windows.bat @@ -0,0 +1,28 @@ +:configure + rm -rf build + mkdir build + cd build + cmake .. +goto :eof + +:build + cmake --build ./build --target clean + cmake --build ./build --target cinnabar-core + cmake --build ./build --target cinnabar-render +goto :eof + +:package +:: zip the dll files intozip files +:: Zip the headerfiles and lib files into development zip files +goto :eof + + +@echo off +cd %0\.. +goto %1 +echo usage: %0 [action] +echo actions: +echo configure +echo build +echo package +goto :eof \ No newline at end of file From b3e4747c6b1c0b706cee60dda6b10d361065bd4a Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:43:07 +0100 Subject: [PATCH 063/107] update apt --- .github/workflows/UnitTests.yml | 3 ++- tests/arch.sh | 2 +- tests/debian.sh | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 3370a20a..14160566 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -8,7 +8,8 @@ jobs: uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Install Dependacies - run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev + run: | + sudo apt update -y && sudo apt upgrade -y && sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev -y - name: Configure run: | diff --git a/tests/arch.sh b/tests/arch.sh index 305756ef..24ff1921 100644 --- a/tests/arch.sh +++ b/tests/arch.sh @@ -68,7 +68,7 @@ function package { } -# set -x +set -x cd $(dirname $0)/.. ls diff --git a/tests/debian.sh b/tests/debian.sh index 0b7fb669..3b93304f 100755 --- a/tests/debian.sh +++ b/tests/debian.sh @@ -62,19 +62,21 @@ function package { rm -rf */ } -set -x cd $(dirname $0)/.. case $1 in configure) +set -x configure ;; build) +set -x build ;; package) +set -x package ;; *) From b2f9f451e5068e4c96bdc26a7fea62c9a9420583 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:43:35 +0100 Subject: [PATCH 064/107] update apt --- .github/workflows/UnitTests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 14160566..64896c8d 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -9,7 +9,9 @@ jobs: - name: Install Dependacies run: | - sudo apt update -y && sudo apt upgrade -y && sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev -y + sudo apt update -y + sudo apt upgrade -y + sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev -y - name: Configure run: | From 55b6ebde1a2448c54c950bc7bd3f01360a99eeed Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 11:51:47 +0100 Subject: [PATCH 065/107] all in one test --- .github/workflows/UnitTests.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 64896c8d..416ba709 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -36,11 +36,13 @@ jobs: - name: Configure run: | sudo docker run ce-arch /app/tests/arch.sh configure - - - name: Build - run: | sudo docker run ce-arch /app/tests/arch.sh build - - - name: Package - run: | sudo docker run ce-arch /app/tests/arch.sh package + + # - name: Build + # run: | + # sudo docker run ce-arch /app/tests/arch.sh build + + # - name: Package + # run: | + # sudo docker run ce-arch /app/tests/arch.sh package From 9e5d69bad0396a202d1f40176b98b9e1f6f27fb3 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 15:26:09 +0100 Subject: [PATCH 066/107] docker container managing --- .github/workflows/UnitTests.yml | 22 +++++++++++++--------- arch.dockerfile | 5 +++-- tests/arch.sh | 6 +++--- 3 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 416ba709..acda10e3 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -35,14 +35,18 @@ jobs: - name: Configure run: | - sudo docker run ce-arch /app/tests/arch.sh configure - sudo docker run ce-arch /app/tests/arch.sh build - sudo docker run ce-arch /app/tests/arch.sh package + sudo docker run -d --name ce-arch-test ce-arch /app/tests/arch.sh configure - # - name: Build - # run: | - # sudo docker run ce-arch /app/tests/arch.sh build + - name: Build + run: | + sudo docker exec ce-arch-test /app/tests/arch.sh build + + - name: Package + run: | + sudo docker exec ce-arch-test /app/tests/arch.sh package + + - name: Cleanup + run: | + sudo docker rm ce-arch-test -f + sudo docker rmi ce-arch -f - # - name: Package - # run: | - # sudo docker run ce-arch /app/tests/arch.sh package diff --git a/arch.dockerfile b/arch.dockerfile index 6c2b1e68..f742e55d 100644 --- a/arch.dockerfile +++ b/arch.dockerfile @@ -1,8 +1,9 @@ FROM archlinux RUN pacman -Syu --noconfirm && pacman -S base-devel cmake sdl2 glew glm assimp --noconfirm --needed COPY . /app -RUN chown nobody:nobody /app -R && chmod 777 /app -R -USER nobody +#RUN chown nobody:nobody /app -R +#RUN chmod 777 /app -R +#USER nobody RUN cd app #RUN /packaging/create-arch.sh docker #CMD bash -c "/app/create-arch.sh $@" docker >> /proc/1/fd/1 \ No newline at end of file diff --git a/tests/arch.sh b/tests/arch.sh index 24ff1921..99360242 100644 --- a/tests/arch.sh +++ b/tests/arch.sh @@ -68,21 +68,21 @@ function package { } -set -x cd $(dirname $0)/.. -ls - case $1 in configure) + set -x configure ;; build) + set -x build ;; package) + set -x package ;; *) From 51e3cc7723ebad4b784b68ca4b121707e0b40d75 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 15:28:00 +0100 Subject: [PATCH 067/107] ficed indentaion --- .github/workflows/UnitTests.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index acda10e3..6fd89165 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -41,12 +41,11 @@ jobs: run: | sudo docker exec ce-arch-test /app/tests/arch.sh build - - name: Package - run: | - sudo docker exec ce-arch-test /app/tests/arch.sh package - - - name: Cleanup - run: | - sudo docker rm ce-arch-test -f - sudo docker rmi ce-arch -f + - name: Package + run: | + sudo docker exec ce-arch-test /app/tests/arch.sh package + - name: Cleanup + run: | + sudo docker rm ce-arch-test -f + sudo docker rmi ce-arch -f From 02e08c8c8fde3838255d98a6b7c05399d8daf240 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 15:30:53 +0100 Subject: [PATCH 068/107] fixed spelling and added chmod --- .github/workflows/UnitTests.yml | 5 +++-- arch.dockerfile | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 6fd89165..06c174e9 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -7,7 +7,7 @@ jobs: - name: Checkout Branch uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - - name: Install Dependacies + - name: Install Dependencies run: | sudo apt update -y sudo apt upgrade -y @@ -32,10 +32,11 @@ jobs: - name: Install Dependencies run: | sudo docker build -f arch.dockerfile -t ce-arch . + sudo docker run -d --name ce-arch-test ce-arch chmod +x /app/tests/arch.sh - name: Configure run: | - sudo docker run -d --name ce-arch-test ce-arch /app/tests/arch.sh configure + sudo docker exec ce-arch-test /app/tests/arch.sh configure - name: Build run: | diff --git a/arch.dockerfile b/arch.dockerfile index f742e55d..4c457e97 100644 --- a/arch.dockerfile +++ b/arch.dockerfile @@ -4,6 +4,6 @@ COPY . /app #RUN chown nobody:nobody /app -R #RUN chmod 777 /app -R #USER nobody -RUN cd app +#RUN cd app #RUN /packaging/create-arch.sh docker #CMD bash -c "/app/create-arch.sh $@" docker >> /proc/1/fd/1 \ No newline at end of file From ba37a912c8139deaa008610e178f0155db05b8a7 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 15:39:02 +0100 Subject: [PATCH 069/107] array --- .github/workflows/UnitTests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 06c174e9..03d19ecd 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -30,9 +30,9 @@ jobs: uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Install Dependencies - run: | - sudo docker build -f arch.dockerfile -t ce-arch . - sudo docker run -d --name ce-arch-test ce-arch chmod +x /app/tests/arch.sh + run: + - sudo docker build -f arch.dockerfile -t ce-arch . + - sudo docker run -d --name ce-arch-test ce-arch chmod +x /app/tests/arch.sh - name: Configure run: | From 399b639b3813bbd9c6db2fd03272247853a26c6e Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 15:39:55 +0100 Subject: [PATCH 070/107] && --- .github/workflows/UnitTests.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 03d19ecd..c92a4462 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -30,9 +30,8 @@ jobs: uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - name: Install Dependencies - run: - - sudo docker build -f arch.dockerfile -t ce-arch . - - sudo docker run -d --name ce-arch-test ce-arch chmod +x /app/tests/arch.sh + run: | + sudo docker build -f arch.dockerfile -t ce-arch . && sudo docker run -d --name ce-arch-test ce-arch chmod +x /app/tests/arch.sh - name: Configure run: | From 1dc51c5381e7d1cc2e29f19d5b93f27c2fc1cdc8 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 15:41:40 +0100 Subject: [PATCH 071/107] separate --- .github/workflows/UnitTests.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index c92a4462..f1073b4d 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -31,10 +31,11 @@ jobs: - name: Install Dependencies run: | - sudo docker build -f arch.dockerfile -t ce-arch . && sudo docker run -d --name ce-arch-test ce-arch chmod +x /app/tests/arch.sh + sudo docker build -f arch.dockerfile -t ce-arch . - name: Configure run: | + sudo docker run -d --name ce-arch-test ce-arch chmod +x /app/tests/arch.sh sudo docker exec ce-arch-test /app/tests/arch.sh configure - name: Build From 2e985ee6a326d4355b74715e49bd5f74dc03c958 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 15:46:59 +0100 Subject: [PATCH 072/107] start and stop with bash --- .github/workflows/UnitTests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index f1073b4d..e5a33a08 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -32,10 +32,11 @@ jobs: - name: Install Dependencies run: | sudo docker build -f arch.dockerfile -t ce-arch . + sudo docker run -d --name ce-arch-test bash + sudo docker exec ce-arch-test ce-arch chmod +x /app/tests/arch.sh - name: Configure run: | - sudo docker run -d --name ce-arch-test ce-arch chmod +x /app/tests/arch.sh sudo docker exec ce-arch-test /app/tests/arch.sh configure - name: Build @@ -48,5 +49,6 @@ jobs: - name: Cleanup run: | + sudo docker stop ce-arch-test sudo docker rm ce-arch-test -f sudo docker rmi ce-arch -f From 70048178f4072255b8473efae4073cf2961ee4bd Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 15:59:56 +0100 Subject: [PATCH 073/107] hmm --- .github/workflows/UnitTests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index e5a33a08..e7170217 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -32,8 +32,8 @@ jobs: - name: Install Dependencies run: | sudo docker build -f arch.dockerfile -t ce-arch . - sudo docker run -d --name ce-arch-test bash - sudo docker exec ce-arch-test ce-arch chmod +x /app/tests/arch.sh + sudo docker run -it -d --name ce-arch-test bash + sudo docker exec ce-arch-test chmod +x /app/tests/arch.sh - name: Configure run: | From 234800db84fc6687a68222d20d118618e4820ed9 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:01:59 +0100 Subject: [PATCH 074/107] hmm --- .github/workflows/UnitTests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index e7170217..337d0f99 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -32,7 +32,7 @@ jobs: - name: Install Dependencies run: | sudo docker build -f arch.dockerfile -t ce-arch . - sudo docker run -it -d --name ce-arch-test bash + sudo docker run -it -d --name ce-arch-test ce-arch sudo docker exec ce-arch-test chmod +x /app/tests/arch.sh - name: Configure From 7904c9ab1c813e934a0376e7e111847c7b9e62ba Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:09:44 +0100 Subject: [PATCH 075/107] clean up --- .github/workflows/UnitTests.yml | 2 +- packaging/create-arch.sh | 93 --------------------------------- packaging/create-deb.sh | 60 --------------------- 3 files changed, 1 insertion(+), 154 deletions(-) delete mode 100755 packaging/create-arch.sh delete mode 100755 packaging/create-deb.sh diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 337d0f99..62a3b6c5 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -47,7 +47,7 @@ jobs: run: | sudo docker exec ce-arch-test /app/tests/arch.sh package - - name: Cleanup + - name: Clean Up run: | sudo docker stop ce-arch-test sudo docker rm ce-arch-test -f diff --git a/packaging/create-arch.sh b/packaging/create-arch.sh deleted file mode 100755 index 9bde8727..00000000 --- a/packaging/create-arch.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/bash - -if [ "$1" == "docker" ] -then - echo "OPENED create-arch.bash IN DOCKER" -else - echo "OPENED create-arch.bash WITHOUT DOCKER" -fi - -function prep_arch { #(TARGET) - TARGET=$1 - NAME=cinnabar-$1 - - PAKNAME=$NAME - ARCH=./arch/$TARGET - - LIB=./build/run/lib$PAKNAME.so - INCLUDE=./src/cinnabar-engine/$TARGET - - PKGROOT=./packaging/$PAKNAME/pkg/$PAKNAME - - if [ ! -f ${LIB} ] - then - cmake --build ./build --target ${NAME} - fi - - rm -rf packaging/${PAKNAME} - mkdir -p packaging/${PAKNAME}/include - - cp -r ${ARCH}/* packaging/${PAKNAME} - - # runtime - cp ${LIB} packaging/${PAKNAME} - - #dev - cp -r ${INCLUDE}/*.hpp packaging/${PAKNAME}/include - cp -r ${INCLUDE}/*.h packaging/${PAKNAME}/include - if [ -f packaging/${PAKNAME}/include/stb_image.h ] - then - rm packaging/${PAKNAME}/include/stb_image.h - fi -} - -function apkg-arch { - cd $1 - makepkg - cd .. -} - -cd $(dirname $0)/.. -if [ "$1" != "docker" ] -then - if [ ! -d ./build ] - then - mkdir build - cd build - cmake .. - cd .. - fi - - - prep_arch core - prep_arch render -fi - -if [ "$(cat /etc/os-release | grep ^ID | sed 's/ID=//g')" != "arch" ] -then - -cd packaging -else - sudo docker build -t cinnabar-arch -f arch.dockerfile . - sudo docker run cinnabar-arch /packaging/create-arch.sh - sudo docker run --rm cinnabar-arch tar -cC /app/packaging/pkg . | tar -xC . - rm dockerfile - rm -rf */ - exit -fi - - - -echo "THIS PART" -for a in "./"*/ -do - apkg-arch $(basename $a) -done -if [ "$1" == "docker" ] -then - mkdir pkg - cp */*.pkg.tar.zst pkg -else - cp */*.pkg.tar.zst . - rm -rf */ -fi diff --git a/packaging/create-deb.sh b/packaging/create-deb.sh deleted file mode 100755 index 89bdcd91..00000000 --- a/packaging/create-deb.sh +++ /dev/null @@ -1,60 +0,0 @@ -#!/bin/bash - -cd $(dirname $0)/.. - - - -function prep_deb { #(TARGET) - TARGET=$1 - NAME=cinnabar-$1 - - PAKNAME=lib$NAME - DEBIAN=./debian/$TARGET/runtime - - PAKNAMEDEV=$PAKNAME-dev - DEBIANDEV=./debian/$TARGET/dev - - LIB=./build/run/$PAKNAME.so - INCLUDE=./src/cinnabar-engine/$TARGET - - if [ ! -f ${LIB} ] - then - cmake --build ./build --target ${NAME} - fi - rm -rf packaging/${PAKNAME} - rm -rf packaging/${PAKNAMEDEV} - mkdir -p packaging/${PAKNAME}/{DEBIAN,usr/lib} - mkdir -p packaging/${PAKNAMEDEV}/{DEBIAN,usr/include/$NAME} - - cp -r ${DEBIAN}/* packaging/${PAKNAME}/DEBIAN - cp ${LIB} packaging/${PAKNAME}/usr/lib - - - cp -r ${DEBIANDEV}/* packaging/${PAKNAMEDEV}/DEBIAN - cp -r ${INCLUDE}/*.hpp packaging/${PAKNAMEDEV}/usr/include/${NAME} - cp -r ${INCLUDE}/*.h packaging/${PAKNAMEDEV}/usr/include/${NAME} - rm packaging/${PAKNAMEDEV}/usr/include/${NAME}/stb_image.h - -} - -if [ ! -d ./build ] -then - mkdir build - cd build - cmake .. - cd .. -fi - -prep_deb core -prep_deb render - - -cd packaging -rm *.deb -for a in "./"*/ -do -echo "$a: $(basename $a)" - dpkg-deb --build $(basename $a) -done -rm -rf */ -cd .. \ No newline at end of file From cc9244e9880d88a992a25a6e92a63c630a850b5b Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:37:14 +0100 Subject: [PATCH 076/107] test releasing --- .github/workflows/CD.yml.disabled | 52 ------------------------------- .github/workflows/UnitTests.yml | 2 +- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 .github/workflows/CD.yml.disabled diff --git a/.github/workflows/CD.yml.disabled b/.github/workflows/CD.yml.disabled deleted file mode 100644 index 83390490..00000000 --- a/.github/workflows/CD.yml.disabled +++ /dev/null @@ -1,52 +0,0 @@ -name: Packaging -on: push -jobs: - packaging: - runs-on: ubuntu-latest - steps: - - name: Install Dependacies - run: sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev - # Checkout the branch - - name: checkout - uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. - - - name: Create Debian Package - run: | - cd packaging - chmod +x ./create-deb.sh - ./create-deb.sh - - - name: Create Arch Package - run: | - cd packaging - chmod +x ./create-arch.sh - ./create-arch.sh - - - name: Publish Packages - # env: - # GH_KEY: ${{ secrets.GH_KEY }} - run: | - git config --global user.email "octokit@github.com" - git config --global user.name "Github Actions" - mkdir -p /tmp/ppa - git clone https://github.com/cinnabar-engine/cinnabar-engine.github.io ./ppa - cp ./packaging/*.deb ./ppa/debian - cp ./packaging/*.pkg.tar.zst ./ppa/arch - cd ./ppa - git add . - git status - git commit -am "Package Update" - git push - - # - name: Pushes to another repository - # id: push_directory - # uses: cpina/github-action-push-to-another-repository@main - # env: - # API_TOKEN_GITHUB: ${{ secrets.GH_KEY }} - # with: - # source-directory: "ppa" - # destination-github-username: "cinnabar-engine" - # destination-repository-name: "cinnabar-engine.github.io" - # user-email: octokit@github.com - # commit-message: Package Update ($GITHUB_REF) - # target-branch: master diff --git a/.github/workflows/UnitTests.yml b/.github/workflows/UnitTests.yml index 62a3b6c5..cc546c32 100644 --- a/.github/workflows/UnitTests.yml +++ b/.github/workflows/UnitTests.yml @@ -1,5 +1,5 @@ name: Unit Testing -on: push +on: [push, pull_request] jobs: Debian: runs-on: ubuntu-latest From 81bdd62937695e264090d5392219fa0567d5ae73 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:37:17 +0100 Subject: [PATCH 077/107] test releasing --- .github/workflows/CD.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/CD.yml diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml new file mode 100644 index 00000000..05b3920a --- /dev/null +++ b/.github/workflows/CD.yml @@ -0,0 +1,22 @@ +name: Packaging +on: + push: + tags: + - '*' + workflow_dispatch: +jobs: + create-release: + - name: version + run: echo "::set-output name=version::$(./bin/azblogfilter --version)" + id: version + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: true + prerelease: true + release_name: ${{ steps.version.outputs.version }} + tag_name: ${{ github.ref }} + body_path: CHANGELOG.md + env: + GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file From 2f33b70b0bfc0e595740fb658e7eda2f5e62fa1b Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:39:03 +0100 Subject: [PATCH 078/107] . From a2a1e8c589555ce9b142c5afeb3ed001a50d201a Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:39:53 +0100 Subject: [PATCH 079/107] indentation --- .github/workflows/CD.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 05b3920a..41148429 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -2,21 +2,21 @@ name: Packaging on: push: tags: - - '*' + - "*" workflow_dispatch: jobs: create-release: - - name: version - run: echo "::set-output name=version::$(./bin/azblogfilter --version)" - id: version - - name: release - uses: actions/create-release@v1 - id: create_release - with: - draft: true - prerelease: true - release_name: ${{ steps.version.outputs.version }} - tag_name: ${{ github.ref }} - body_path: CHANGELOG.md - env: - GITHUB_TOKEN: ${{ github.token }} \ No newline at end of file + - name: version + run: echo "::set-output name=version::$(./bin/azblogfilter --version)" + id: version + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: true + prerelease: true + release_name: ${{ steps.version.outputs.version }} + tag_name: ${{ github.ref }} + body_path: CHANGELOG.md + env: + GITHUB_TOKEN: ${{ github.token }} From 971e940a34226b67f14b055dd26ade8418ddc046 Mon Sep 17 00:00:00 2001 From: Cameron Trow Date: Tue, 17 Aug 2021 16:41:34 +0100 Subject: [PATCH 080/107] steps object --- .github/workflows/CD.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 41148429..976a7f44 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -6,6 +6,8 @@ on: workflow_dispatch: jobs: create-release: + runs-on: ubuntu-latest + steps: - name: version run: echo "::set-output name=version::$(./bin/azblogfilter --version)" id: version From 2f59a0e5c1fd2d283ce9834d86ef9ba54b5c1f82 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:42:47 +0100 Subject: [PATCH 081/107] manual activation --- .github/workflows/CD.yml | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 976a7f44..74eac3b2 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,24 +1,24 @@ name: Packaging on: - push: - tags: - - "*" + # push: + # tags: + # - "*" workflow_dispatch: jobs: create-release: runs-on: ubuntu-latest steps: - - name: version - run: echo "::set-output name=version::$(./bin/azblogfilter --version)" - id: version - - name: release - uses: actions/create-release@v1 - id: create_release - with: - draft: true - prerelease: true - release_name: ${{ steps.version.outputs.version }} - tag_name: ${{ github.ref }} - body_path: CHANGELOG.md - env: - GITHUB_TOKEN: ${{ github.token }} + - name: version + run: echo "::set-output name=version::$(./bin/azblogfilter --version)" + id: version + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: true + prerelease: true + release_name: ${{ steps.version.outputs.version }} + tag_name: ${{ github.ref }} + body_path: CHANGELOG.md + env: + GITHUB_TOKEN: ${{ github.token }} From 94049ccdcea2f6544a07a70378844fb652e01c43 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:46:08 +0100 Subject: [PATCH 082/107] spelling --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 74eac3b2..4ce6ae21 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,4 +1,4 @@ -name: Packaging +name: Continuous Delivery on: # push: # tags: From fd54bf1b8df8f2cac06e411b6519f5b093162596 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:46:45 +0100 Subject: [PATCH 083/107] spelling --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 4ce6ae21..8c1125d2 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,9 +1,9 @@ name: Continuous Delivery on: + push: # push: # tags: # - "*" - workflow_dispatch: jobs: create-release: runs-on: ubuntu-latest From bbcd6ee36eb2a7349ad2bbc7ef9647780571c97a Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 16:48:13 +0100 Subject: [PATCH 084/107] body --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 8c1125d2..9ec42b16 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -19,6 +19,6 @@ jobs: prerelease: true release_name: ${{ steps.version.outputs.version }} tag_name: ${{ github.ref }} - body_path: CHANGELOG.md + body: hello world env: GITHUB_TOKEN: ${{ github.token }} From 9f2311b1433b8a638eb8465bdb5937c159c5722e Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:05:39 +0100 Subject: [PATCH 085/107] test deb release --- .github/workflows/CD.yml | 62 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 9ec42b16..2e62264f 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -22,3 +22,65 @@ jobs: body: hello world env: GITHUB_TOKEN: ${{ github.token }} + Debian: + runs-on: ubuntu-latest + steps: + - name: Checkout Branch + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. + + - name: Install Dependencies + run: | + sudo apt update -y + sudo apt upgrade -y + sudo apt install build-essential cmake libsdl2-dev libglew-dev libglm-dev libassimp-dev -y + + - name: Configure + run: | + tests/debian.sh configure + - name: Build + run: | + tests/debian.sh build + + - name: Package + run: | + tests/debian.sh package + + - name: libcinnabar-core.deb + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./pkg/libcinnabar-core.deb + asset_name: libcinnabar-core.deb + asset_content_type: application/vnd.debian.binary-package + + - name: libcinnabar-core-dev.deb + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./pkg/libcinnabar-core-dev.deb + asset_name: libcinnabar-core-dev.deb + asset_content_type: application/vnd.debian.binary-package + + - name: libcinnabar-render.deb + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./pkg/libcinnabar-renderv.deb + asset_name: libcinnabar-render.deb + asset_content_type: application/vnd.debian.binary-package + + - name: libcinnabar-render-dev.deb + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./pkg/libcinnabar-render-dev.deb + asset_name: libcinnabar-render-dev.deb + asset_content_type: application/vnd.debian.binary-package From d7f3daaf677a8aa9cac02d03ef590506e3c90509 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:07:02 +0100 Subject: [PATCH 086/107] only this branch --- .github/workflows/CD.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 2e62264f..a23c4ab8 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,6 +1,8 @@ name: Continuous Delivery on: push: + branches: + - feature/gh-actions # push: # tags: # - "*" From 1f5cca640a70f92bb190a438ee36036af0a10dbf Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:10:35 +0100 Subject: [PATCH 087/107] fix maybe --- .github/workflows/CD.yml | 40 +++++++++++++++++++--------------------- 1 file changed, 19 insertions(+), 21 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index a23c4ab8..c7fdc65d 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -7,23 +7,6 @@ on: # tags: # - "*" jobs: - create-release: - runs-on: ubuntu-latest - steps: - - name: version - run: echo "::set-output name=version::$(./bin/azblogfilter --version)" - id: version - - name: release - uses: actions/create-release@v1 - id: create_release - with: - draft: true - prerelease: true - release_name: ${{ steps.version.outputs.version }} - tag_name: ${{ github.ref }} - body: hello world - env: - GITHUB_TOKEN: ${{ github.token }} Debian: runs-on: ubuntu-latest steps: @@ -52,7 +35,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ jobs.Release.steps.release.outputs.upload_url }} asset_path: ./pkg/libcinnabar-core.deb asset_name: libcinnabar-core.deb asset_content_type: application/vnd.debian.binary-package @@ -62,7 +45,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ jobs.Release.steps.release.outputs.upload_url }} asset_path: ./pkg/libcinnabar-core-dev.deb asset_name: libcinnabar-core-dev.deb asset_content_type: application/vnd.debian.binary-package @@ -72,7 +55,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ jobs.Release.steps.release.outputs.upload_url }} asset_path: ./pkg/libcinnabar-renderv.deb asset_name: libcinnabar-render.deb asset_content_type: application/vnd.debian.binary-package @@ -82,7 +65,22 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.create_release.outputs.upload_url }} + upload_url: ${{ jobs.Release.steps.release.outputs.upload_url }} asset_path: ./pkg/libcinnabar-render-dev.deb asset_name: libcinnabar-render-dev.deb asset_content_type: application/vnd.debian.binary-package + + Release: + runs-on: ubuntu-latest + steps: + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: true + prerelease: true + release_name: test + tag_name: ${{ github.ref }} + body: hello world + env: + GITHUB_TOKEN: ${{ github.token }} From bbb4175995bb5405f5ae96e8dc903f85db50e055 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:20:22 +0100 Subject: [PATCH 088/107] fix maybe --- .github/workflows/CD.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index c7fdc65d..5fd7de51 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -30,12 +30,15 @@ jobs: run: | tests/debian.sh package + Release: + runs-on: ubuntu-latest + steps: - name: libcinnabar-core.deb uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ jobs.Release.steps.release.outputs.upload_url }} + upload_url: ${{ steps.release.outputs.upload_url }} asset_path: ./pkg/libcinnabar-core.deb asset_name: libcinnabar-core.deb asset_content_type: application/vnd.debian.binary-package @@ -45,7 +48,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ jobs.Release.steps.release.outputs.upload_url }} + upload_url: ${{ steps.release.outputs.upload_url }} asset_path: ./pkg/libcinnabar-core-dev.deb asset_name: libcinnabar-core-dev.deb asset_content_type: application/vnd.debian.binary-package @@ -55,7 +58,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ jobs.Release.steps.release.outputs.upload_url }} + upload_url: ${{ steps.release.outputs.upload_url }} asset_path: ./pkg/libcinnabar-renderv.deb asset_name: libcinnabar-render.deb asset_content_type: application/vnd.debian.binary-package @@ -65,16 +68,13 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ jobs.Release.steps.release.outputs.upload_url }} + upload_url: ${{ steps.release.outputs.upload_url }} asset_path: ./pkg/libcinnabar-render-dev.deb asset_name: libcinnabar-render-dev.deb asset_content_type: application/vnd.debian.binary-package - - Release: - runs-on: ubuntu-latest - steps: - name: release uses: actions/create-release@v1 + needs: Debian id: create_release with: draft: true From 8104873c67ec8cfa2319913ba907aa8167c0bbf3 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:22:22 +0100 Subject: [PATCH 089/107] needs --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 5fd7de51..9cbb6182 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -32,6 +32,7 @@ jobs: Release: runs-on: ubuntu-latest + needs: Debian steps: - name: libcinnabar-core.deb uses: actions/upload-release-asset@v1 @@ -74,7 +75,6 @@ jobs: asset_content_type: application/vnd.debian.binary-package - name: release uses: actions/create-release@v1 - needs: Debian id: create_release with: draft: true From e9b04a5da13445c7cb54c17539b1dbe1b6cd284b Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:27:38 +0100 Subject: [PATCH 090/107] artifact transfering --- .github/workflows/CD.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 9cbb6182..c3037bca 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -30,17 +30,26 @@ jobs: run: | tests/debian.sh package + - uses: actions/upload-artifact@v2 + with: + name: debian-artifact + path: pkg/ + Release: runs-on: ubuntu-latest needs: Debian steps: + - uses: actions/download-artifact@v2 + with: + name: debian-artifact + - name: libcinnabar-core.deb uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: ./pkg/libcinnabar-core.deb + asset_path: ./libcinnabar-core.deb asset_name: libcinnabar-core.deb asset_content_type: application/vnd.debian.binary-package @@ -50,7 +59,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: ./pkg/libcinnabar-core-dev.deb + asset_path: ./libcinnabar-core-dev.deb asset_name: libcinnabar-core-dev.deb asset_content_type: application/vnd.debian.binary-package @@ -60,7 +69,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: ./pkg/libcinnabar-renderv.deb + asset_path: ./libcinnabar-renderv.deb asset_name: libcinnabar-render.deb asset_content_type: application/vnd.debian.binary-package @@ -70,7 +79,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.release.outputs.upload_url }} - asset_path: ./pkg/libcinnabar-render-dev.deb + asset_path: ./libcinnabar-render-dev.deb asset_name: libcinnabar-render-dev.deb asset_content_type: application/vnd.debian.binary-package - name: release From 5481d823dd8047b1226f74b8b69b01ef4aa05afd Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:31:26 +0100 Subject: [PATCH 091/107] chnage order --- .github/workflows/CD.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index c3037bca..4ba1dc1a 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -43,6 +43,18 @@ jobs: with: name: debian-artifact + - name: release + uses: actions/create-release@v1 + id: create_release + with: + draft: true + prerelease: true + release_name: test + tag_name: ${{ github.ref }} + body: hello world + env: + GITHUB_TOKEN: ${{ github.token }} + - name: libcinnabar-core.deb uses: actions/upload-release-asset@v1 env: @@ -82,14 +94,3 @@ jobs: asset_path: ./libcinnabar-render-dev.deb asset_name: libcinnabar-render-dev.deb asset_content_type: application/vnd.debian.binary-package - - name: release - uses: actions/create-release@v1 - id: create_release - with: - draft: true - prerelease: true - release_name: test - tag_name: ${{ github.ref }} - body: hello world - env: - GITHUB_TOKEN: ${{ github.token }} From b0e769b09274068ffb88ee76ee09b634b94cfcb5 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:38:30 +0100 Subject: [PATCH 092/107] arch artifact --- .github/workflows/CD.yml | 44 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 4ba1dc1a..a630ebd7 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -35,14 +35,56 @@ jobs: name: debian-artifact path: pkg/ + Arch: + runs-on: ubuntu-latest + steps: + - name: Checkout Branch + uses: actions/checkout@v2-beta # use either @v2-beta or @master. Eventually there will be a @v2 tag. + + - name: Install Dependencies + run: | + sudo docker build -f arch.dockerfile -t ce-arch . + sudo docker run -it -d --name ce-arch-test ce-arch + sudo docker exec ce-arch-test chmod +x /app/tests/arch.sh + + - name: Configure + run: | + sudo docker exec ce-arch-test /app/tests/arch.sh configure + + - name: Build + run: | + sudo docker exec ce-arch-test /app/tests/arch.sh build + + - name: Package + run: | + sudo docker exec ce-arch-test /app/tests/arch.sh package + mkdir ./pkg + sudo docker cp ce-arch-test:/app/pkg ./pkg + ls ./pkg + + - name: Clean Up + run: | + sudo docker stop ce-arch-test + sudo docker rm ce-arch-test -f + sudo docker rmi ce-arch -f + + - uses: actions/upload-artifact@v2 + with: + name: arch-artifact + path: pkg/ + Release: runs-on: ubuntu-latest - needs: Debian + needs: [Debian, Arch] steps: - uses: actions/download-artifact@v2 with: name: debian-artifact + - uses: actions/download-artifact@v2 + with: + name: arch-artifact + - name: release uses: actions/create-release@v1 id: create_release From 40c3430ae2700052fe621479527ca84280aa178a Mon Sep 17 00:00:00 2001 From: Cameron Trow Date: Tue, 17 Aug 2021 17:39:31 +0100 Subject: [PATCH 093/107] Update CD.yml --- .github/workflows/CD.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index a630ebd7..b9ff645f 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -59,8 +59,7 @@ jobs: run: | sudo docker exec ce-arch-test /app/tests/arch.sh package mkdir ./pkg - sudo docker cp ce-arch-test:/app/pkg ./pkg - ls ./pkg + sudo docker cp ce-arch-test:/app/pkg ./pkg - name: Clean Up run: | From 6c1ed0ed0b968433d763851a20c41cffc739c658 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:40:18 +0100 Subject: [PATCH 094/107] indentation --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index b9ff645f..8fa8a193 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -59,7 +59,7 @@ jobs: run: | sudo docker exec ce-arch-test /app/tests/arch.sh package mkdir ./pkg - sudo docker cp ce-arch-test:/app/pkg ./pkg + sudo docker cp ce-arch-test:/app/pkg ./pkg - name: Clean Up run: | From 22ac35785ebd62e7415f79ff158ad171c9bc4215 Mon Sep 17 00:00:00 2001 From: Cameron Trow Date: Tue, 17 Aug 2021 17:40:44 +0100 Subject: [PATCH 095/107] Update CD.yml --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 8fa8a193..b9ff645f 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -59,7 +59,7 @@ jobs: run: | sudo docker exec ce-arch-test /app/tests/arch.sh package mkdir ./pkg - sudo docker cp ce-arch-test:/app/pkg ./pkg + sudo docker cp ce-arch-test:/app/pkg ./pkg - name: Clean Up run: | From bb576118015e7bb186887b7ed324f23a75b9511f Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:41:54 +0100 Subject: [PATCH 096/107] indentation --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index b9ff645f..323b6fa5 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -59,7 +59,7 @@ jobs: run: | sudo docker exec ce-arch-test /app/tests/arch.sh package mkdir ./pkg - sudo docker cp ce-arch-test:/app/pkg ./pkg + sudo docker cp ce-arch-test:/app/pkg ./pkg - name: Clean Up run: | From 5cb2174759cb2049d5477e952457830d2bb64979 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:45:17 +0100 Subject: [PATCH 097/107] step id --- .github/workflows/CD.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 323b6fa5..4d791eac 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -101,7 +101,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./libcinnabar-core.deb asset_name: libcinnabar-core.deb asset_content_type: application/vnd.debian.binary-package @@ -111,7 +111,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./libcinnabar-core-dev.deb asset_name: libcinnabar-core-dev.deb asset_content_type: application/vnd.debian.binary-package @@ -121,7 +121,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./libcinnabar-renderv.deb asset_name: libcinnabar-render.deb asset_content_type: application/vnd.debian.binary-package @@ -131,7 +131,7 @@ jobs: env: GITHUB_TOKEN: ${{ github.token }} with: - upload_url: ${{ steps.release.outputs.upload_url }} + upload_url: ${{ steps.create_release.outputs.upload_url }} asset_path: ./libcinnabar-render-dev.deb asset_name: libcinnabar-render-dev.deb asset_content_type: application/vnd.debian.binary-package From 1faabaf79c079c85544343fbd56047af2a8a9833 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 17:50:59 +0100 Subject: [PATCH 098/107] arch packages --- .github/workflows/CD.yml | 22 +++++++++++++++++++++- arch.dockerfile | 6 +++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 4d791eac..5d1d2272 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -122,7 +122,7 @@ jobs: GITHUB_TOKEN: ${{ github.token }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: ./libcinnabar-renderv.deb + asset_path: ./libcinnabar-render.deb asset_name: libcinnabar-render.deb asset_content_type: application/vnd.debian.binary-package @@ -135,3 +135,23 @@ jobs: asset_path: ./libcinnabar-render-dev.deb asset_name: libcinnabar-render-dev.deb asset_content_type: application/vnd.debian.binary-package + + - name: cinnabar-core.pkg.tar.zst + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./cinnabar-core.pkg.tar.zst + asset_name: cinnabar-core.pkg.tar.zst + asset_content_type: application/vnd.debian.binary-package + + - name: cinnabar-render.pkg.tar.zst + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./cinnabar-render.pkg.tar.zst + asset_name: cinnabar-render.pkg.tar.zst + asset_content_type: application/vnd.debian.binary-package diff --git a/arch.dockerfile b/arch.dockerfile index 4c457e97..723629d8 100644 --- a/arch.dockerfile +++ b/arch.dockerfile @@ -1,9 +1,9 @@ FROM archlinux RUN pacman -Syu --noconfirm && pacman -S base-devel cmake sdl2 glew glm assimp --noconfirm --needed COPY . /app -#RUN chown nobody:nobody /app -R -#RUN chmod 777 /app -R -#USER nobody +RUN chown nobody:nobody /app -R +RUN chmod 7777 /app -R +USER nobody #RUN cd app #RUN /packaging/create-arch.sh docker #CMD bash -c "/app/create-arch.sh $@" docker >> /proc/1/fd/1 \ No newline at end of file From 2e4de0a88167b859ff423cd1b2d51c755b136e1f Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 18:05:30 +0100 Subject: [PATCH 099/107] pkg folder --- tests/arch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/arch.sh b/tests/arch.sh index 99360242..54eaf147 100644 --- a/tests/arch.sh +++ b/tests/arch.sh @@ -29,7 +29,7 @@ function prep_arch { #(TARGET) PKGROOT=./pkg/$PAKNAME/pkg/$PAKNAME - mkdir -p packaging/${PAKNAME}/include + mkdir -p pkg/${PAKNAME}/include cp -r ${ARCH}/* pkg/${PAKNAME} From 03739ab08f0cdf9e3dc4ed3824be64e18cd3b8c7 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 18:57:43 +0100 Subject: [PATCH 100/107] fixed packaging --- tests/arch.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/arch.sh b/tests/arch.sh index 54eaf147..06dd83a9 100644 --- a/tests/arch.sh +++ b/tests/arch.sh @@ -49,6 +49,7 @@ function prep_arch { #(TARGET) function apkg-arch { cd $1 makepkg + mv *.pkg.tar.zst .. cd .. } @@ -60,11 +61,13 @@ function package { prep_arch render cd pkg + ls for a in "./"*/ do apkg-arch $(basename $a) done + rm -rf */ } From 3afd5dc551d46420acd1177dcf2b425fb805de71 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 19:00:57 +0100 Subject: [PATCH 101/107] dir --- .github/workflows/CD.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 5d1d2272..40a6b74a 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -58,8 +58,7 @@ jobs: - name: Package run: | sudo docker exec ce-arch-test /app/tests/arch.sh package - mkdir ./pkg - sudo docker cp ce-arch-test:/app/pkg ./pkg + sudo docker cp ce-arch-test:/app/pkg . - name: Clean Up run: | From 72edfd16de553956268e95f1dcf0595aef3ec948 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 19:06:17 +0100 Subject: [PATCH 102/107] rename --- tests/arch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/arch.sh b/tests/arch.sh index 06dd83a9..9d5fc2e5 100644 --- a/tests/arch.sh +++ b/tests/arch.sh @@ -49,7 +49,7 @@ function prep_arch { #(TARGET) function apkg-arch { cd $1 makepkg - mv *.pkg.tar.zst .. + mv *.pkg.tar.zst ../$1.pkg.tar.zst cd .. } From 77e7184bb81dc74156e71f37f92f0f3a19b4b89f Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 19:18:06 +0100 Subject: [PATCH 103/107] only releases will it release --- .github/workflows/CD.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 40a6b74a..0b2dac9b 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,11 +1,10 @@ name: Continuous Delivery on: push: - branches: - - feature/gh-actions - # push: - # tags: - # - "*" + tags: + - "*" + # branches: + # - release jobs: Debian: runs-on: ubuntu-latest @@ -87,9 +86,9 @@ jobs: uses: actions/create-release@v1 id: create_release with: - draft: true - prerelease: true - release_name: test + draft: false + prerelease: false + release_name: Cinnabar ${{ github.ref }} tag_name: ${{ github.ref }} body: hello world env: From efe6d7c9cab4ca6a3b194e394ccd7b6b046bd89a Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 20:36:40 +0100 Subject: [PATCH 104/107] added manual release --- .github/workflows/CD.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 0b2dac9b..e0db39ec 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -5,6 +5,7 @@ on: - "*" # branches: # - release + workflow_dispatch: jobs: Debian: runs-on: ubuntu-latest From 5d79bcf29ab359c9343a5dd0214d520bc39cdf58 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 20:36:48 +0100 Subject: [PATCH 105/107] added manual release --- .github/workflows/CD.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index e0db39ec..957dcfa6 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -5,7 +5,7 @@ on: - "*" # branches: # - release - workflow_dispatch: + workflow_dispatch: jobs: Debian: runs-on: ubuntu-latest From c8845c848d0d50e8e2ad11cba85ac1dcb799b8c6 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 20:38:25 +0100 Subject: [PATCH 106/107] test --- .github/workflows/CD.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 957dcfa6..95b7339e 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,11 +1,12 @@ name: Continuous Delivery on: - push: - tags: - - "*" - # branches: - # - release - workflow_dispatch: + workflow_dispatch + # push: + # tags: + # - "*" + # # branches: + # # - release + # workflow_dispatch: jobs: Debian: runs-on: ubuntu-latest From 727d93ea01440d636d2bf2f721c9c3b5f4ab6a94 Mon Sep 17 00:00:00 2001 From: Tumble Date: Tue, 17 Aug 2021 20:40:01 +0100 Subject: [PATCH 107/107] finishing touches --- .github/workflows/CD.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/CD.yml b/.github/workflows/CD.yml index 95b7339e..384e5c97 100644 --- a/.github/workflows/CD.yml +++ b/.github/workflows/CD.yml @@ -1,12 +1,11 @@ name: Continuous Delivery on: - workflow_dispatch - # push: - # tags: - # - "*" - # # branches: - # # - release - # workflow_dispatch: + push: + tags: + - "*" + branches: + - release + workflow_dispatch: jobs: Debian: runs-on: ubuntu-latest