From a62f739eb16c9acfc8335d1a7293ecbf5f97eaf8 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Tue, 3 Dec 2019 13:55:57 -0500 Subject: [PATCH 01/21] Create ccpp.yml --- .github/workflows/ccpp.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/ccpp.yml diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml new file mode 100644 index 0000000000..1247fb050c --- /dev/null +++ b/.github/workflows/ccpp.yml @@ -0,0 +1,19 @@ +name: C/C++ CI + +on: [push] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From ce40431dc32fb0bf6d0d420296afa14730c1ab0d Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Tue, 3 Dec 2019 14:02:58 -0500 Subject: [PATCH 02/21] Added repo checkouts. --- .github/workflows/ccpp.yml | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 1247fb050c..eeff674046 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -3,17 +3,23 @@ name: C/C++ CI on: [push] jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: configure - run: ./configure - - name: make - run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - uses: actions/checkout@v1 + with: + repository: bkaradzic/bgfx + ref: refs/heads/master + - uses: actions/checkout@v1 + with: + repository: bkaradzic/bimg + ref: refs/heads/master + - name: configure + run: ./configure + - name: make + run: make + - name: make check + run: make check + - name: make distcheck + run: make distcheck From d418a4ec06d8a54f261f59240de834ef68b346ca Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Tue, 3 Dec 2019 15:11:20 -0500 Subject: [PATCH 03/21] Added a sort of nominal build setup. --- .github/workflows/ccpp.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index eeff674046..e3fcf95e9e 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -7,19 +7,21 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 + with: + path: ${{ GITHUB_WORKSPACE }}/bgfx - uses: actions/checkout@v1 with: - repository: bkaradzic/bgfx + path: ${{ GITHUB_WORKSPACE }}/bx + repository: bkaradzic/bx ref: refs/heads/master - uses: actions/checkout@v1 with: + path: ${{ GITHUB_WORKSPACE }}/bimg repository: bkaradzic/bimg ref: refs/heads/master - - name: configure - run: ./configure - - name: make + - name: generate project files run: make - - name: make check - run: make check - - name: make distcheck - run: make distcheck + working-directory: ./bgfx + - name: make + run: make linux-release64 + working-directory: ./bgfx From df33e01570096ffa0f5d3b2ba994f542548567f2 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Tue, 3 Dec 2019 15:39:50 -0500 Subject: [PATCH 04/21] Trying a path fix. --- .github/workflows/ccpp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index e3fcf95e9e..43433eacb4 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -8,15 +8,15 @@ jobs: steps: - uses: actions/checkout@v1 with: - path: ${{ GITHUB_WORKSPACE }}/bgfx + path: ./bgfx - uses: actions/checkout@v1 with: - path: ${{ GITHUB_WORKSPACE }}/bx + path: ./bx repository: bkaradzic/bx ref: refs/heads/master - uses: actions/checkout@v1 with: - path: ${{ GITHUB_WORKSPACE }}/bimg + path: ./bimg repository: bkaradzic/bimg ref: refs/heads/master - name: generate project files From f27ae8801b666693cdc1a8c152484ae61de5f2b6 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Tue, 3 Dec 2019 15:48:26 -0500 Subject: [PATCH 05/21] Screwing with path settings. --- .github/workflows/ccpp.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 43433eacb4..77d914838a 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -21,7 +21,5 @@ jobs: ref: refs/heads/master - name: generate project files run: make - working-directory: ./bgfx - name: make run: make linux-release64 - working-directory: ./bgfx From d3834955ad37b9631ebe0fe061a2e6ff192017f9 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Tue, 3 Dec 2019 17:25:09 -0500 Subject: [PATCH 06/21] Added missing OpenGL dep. --- .github/workflows/ccpp.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 77d914838a..e02c2b0984 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -19,7 +19,10 @@ jobs: path: ./bimg repository: bkaradzic/bimg ref: refs/heads/master - - name: generate project files + # TODO: cache this dependency. + - name: Install build dependencies. + run: sudo apt-get install mesa-common-dev libglu1-mesa-dev + - name: Generate project files. run: make - - name: make + - name: Compile. run: make linux-release64 From 9cc3ce0513fa21e3c79ffc448b991b2458f0ca4b Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Wed, 4 Dec 2019 13:14:44 -0500 Subject: [PATCH 07/21] Attempting cross platform build. --- .editorconfig | 4 ++ .github/workflows/ccpp.yml | 90 ++++++++++++++++++++++++++++---------- 2 files changed, 71 insertions(+), 23 deletions(-) diff --git a/.editorconfig b/.editorconfig index a1395a709b..094be9037b 100644 --- a/.editorconfig +++ b/.editorconfig @@ -18,3 +18,7 @@ indent_style = space [*.md] trim_trailing_whitespace = false max_line_length = 80 + +[*.yml] +indent_style = space +indent_size = 2 diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index e02c2b0984..16635ed7f7 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -3,26 +3,70 @@ name: C/C++ CI on: [push] jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - with: - path: ./bgfx - - uses: actions/checkout@v1 - with: - path: ./bx - repository: bkaradzic/bx - ref: refs/heads/master - - uses: actions/checkout@v1 - with: - path: ./bimg - repository: bkaradzic/bimg - ref: refs/heads/master - # TODO: cache this dependency. - - name: Install build dependencies. - run: sudo apt-get install mesa-common-dev libglu1-mesa-dev - - name: Generate project files. - run: make - - name: Compile. - run: make linux-release64 + build: + strategy: + matrix: + include: + - platform: osx + arch: 64 + config: release + image: macos-latest + - platform: win + arch: 64 + config: release + image: windows-latest + - platform: linux + arch: 64 + config: release + image: ubuntu-latest + runs-on: ${{ matrix.image }} + steps: + - uses: actions/checkout@v1 + with: + path: ./bgfx + - uses: actions/checkout@v1 + with: + path: ./bx + repository: bkaradzic/bx + ref: refs/heads/master + - uses: actions/checkout@v1 + with: + path: ./bimg + repository: bkaradzic/bimg + ref: refs/heads/master + # TODO: cache this dependency. + - name: Install build dependencies (Linux). + run: sudo apt-get install mesa-common-dev libglu1-mesa-dev + if: matrix.platform == 'linux' + - name: Generate project files. + run: make + - name: Compile. + run: make ${{matrix.platform}}-${{matrix.config}}${{matrix.arch}} + # release: + # runs-on: ubuntu-latest + # requires: [build] + # steps: + # # TODO: fix this thing. + # - name: Compress build output + # run: | + # zip --junk-paths my-artifact ./bgfx/README.md + # - name: Create Release + # id: create_release + # uses: actions/create-release@v1.0.0 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # tag_name: ${{ github.ref }} + # release_name: Release ${{ github.ref }} + # draft: false + # prerelease: false + # - name: Upload release artifact + # id: upload-release-asset + # uses: actions/upload-release-asset@v1.0.1 + # env: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # with: + # upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps + # asset_path: ./my-artifact.zip + # asset_name: my-artifact.zip + # asset_content_type: application/zip From 67aa67141df5ef9a6b045008e2d6e3ab208a4283 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Wed, 4 Dec 2019 13:17:23 -0500 Subject: [PATCH 08/21] Fixed typo. --- .github/workflows/ccpp.yml | 46 +++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 16635ed7f7..1af46e275a 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -19,29 +19,29 @@ jobs: arch: 64 config: release image: ubuntu-latest - runs-on: ${{ matrix.image }} - steps: - - uses: actions/checkout@v1 - with: - path: ./bgfx - - uses: actions/checkout@v1 - with: - path: ./bx - repository: bkaradzic/bx - ref: refs/heads/master - - uses: actions/checkout@v1 - with: - path: ./bimg - repository: bkaradzic/bimg - ref: refs/heads/master - # TODO: cache this dependency. - - name: Install build dependencies (Linux). - run: sudo apt-get install mesa-common-dev libglu1-mesa-dev - if: matrix.platform == 'linux' - - name: Generate project files. - run: make - - name: Compile. - run: make ${{matrix.platform}}-${{matrix.config}}${{matrix.arch}} + runs-on: ${{ matrix.image }} + steps: + - uses: actions/checkout@v1 + with: + path: ./bgfx + - uses: actions/checkout@v1 + with: + path: ./bx + repository: bkaradzic/bx + ref: refs/heads/master + - uses: actions/checkout@v1 + with: + path: ./bimg + repository: bkaradzic/bimg + ref: refs/heads/master + # TODO: cache this dependency. + - name: Install build dependencies (Linux). + run: sudo apt-get install mesa-common-dev libglu1-mesa-dev + if: matrix.platform == 'linux' + - name: Generate project files. + run: make + - name: Compile. + run: make ${{matrix.platform}}-${{matrix.config}}${{matrix.arch}} # release: # runs-on: ubuntu-latest # requires: [build] From 7fdb45a36ab83e6528d12f347e00b3e5818ddfed Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Wed, 4 Dec 2019 13:25:27 -0500 Subject: [PATCH 09/21] Added build list to matrix. --- .github/workflows/ccpp.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 1af46e275a..52ac3a437d 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -6,17 +6,24 @@ jobs: build: strategy: matrix: + platform: [mac, linux, windows] + # arch: [64] + # config: [release] + # image: [macos-latest, windows-latest, ubuntu-latest] include: - - platform: osx + - platform: mac arch: 64 + compiler: osx config: release image: macos-latest - - platform: win + - platform: windows arch: 64 + compiler: vs2017 config: release image: windows-latest - platform: linux arch: 64 + compiler: linux config: release image: ubuntu-latest runs-on: ${{ matrix.image }} @@ -36,12 +43,13 @@ jobs: ref: refs/heads/master # TODO: cache this dependency. - name: Install build dependencies (Linux). - run: sudo apt-get install mesa-common-dev libglu1-mesa-dev + # See: https://bkaradzic.github.io/bgfx/build.html#linux + run: sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev if: matrix.platform == 'linux' - name: Generate project files. run: make - name: Compile. - run: make ${{matrix.platform}}-${{matrix.config}}${{matrix.arch}} + run: make ${{matrix.compiler}}-${{matrix.config}}${{matrix.arch}} # release: # runs-on: ubuntu-latest # requires: [build] From 555e856725ccde1b13429cfc01d383d8c8a778d0 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Wed, 4 Dec 2019 13:34:52 -0500 Subject: [PATCH 10/21] Tryng to update compiler. --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 52ac3a437d..05e12b18b6 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -18,7 +18,7 @@ jobs: image: macos-latest - platform: windows arch: 64 - compiler: vs2017 + compiler: vs2019 config: release image: windows-latest - platform: linux From dc7e3b2a5a019134f20647963d3ff78d8deaf8d0 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Wed, 4 Dec 2019 13:44:22 -0500 Subject: [PATCH 11/21] Testing just the mac and linux builds. --- .github/workflows/ccpp.yml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 05e12b18b6..ec78716813 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -6,26 +6,20 @@ jobs: build: strategy: matrix: - platform: [mac, linux, windows] - # arch: [64] - # config: [release] - # image: [macos-latest, windows-latest, ubuntu-latest] + platform: [mac, linux] include: - platform: mac - arch: 64 compiler: osx - config: release + config: release64 image: macos-latest - - platform: windows - arch: 64 - compiler: vs2019 - config: release - image: windows-latest - platform: linux - arch: 64 compiler: linux - config: release + config: release64 image: ubuntu-latest + # - platform: windows + # compiler: vs2017 + # config: release64 + # image: windows-latest runs-on: ${{ matrix.image }} steps: - uses: actions/checkout@v1 @@ -49,7 +43,7 @@ jobs: - name: Generate project files. run: make - name: Compile. - run: make ${{matrix.compiler}}-${{matrix.config}}${{matrix.arch}} + run: make ${{matrix.compiler}}-${{matrix.config}} # release: # runs-on: ubuntu-latest # requires: [build] From 856757f74c7759a14f611d915c5b353e481cf3ae Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Wed, 4 Dec 2019 14:46:06 -0500 Subject: [PATCH 12/21] Added a release arch. --- .github/workflows/ccpp.yml | 51 +++++++++++++++++--------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index ec78716813..bc84bd3584 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -44,31 +44,26 @@ jobs: run: make - name: Compile. run: make ${{matrix.compiler}}-${{matrix.config}} - # release: - # runs-on: ubuntu-latest - # requires: [build] - # steps: - # # TODO: fix this thing. - # - name: Compress build output - # run: | - # zip --junk-paths my-artifact ./bgfx/README.md - # - name: Create Release - # id: create_release - # uses: actions/create-release@v1.0.0 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # tag_name: ${{ github.ref }} - # release_name: Release ${{ github.ref }} - # draft: false - # prerelease: false - # - name: Upload release artifact - # id: upload-release-asset - # uses: actions/upload-release-asset@v1.0.1 - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # with: - # upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps - # asset_path: ./my-artifact.zip - # asset_name: my-artifact.zip - # asset_content_type: application/zip + release: + runs-on: ubuntu-latest + requires: [build] + steps: + - uses: actions/checkout@v1 + with: + path: ./bgfx + - uses: actions/checkout@v1 + with: + path: ./bx + repository: bkaradzic/bx + ref: refs/heads/master + - name: Copy include headers to build output. + run: | + mkdir -p ./output/include/bgfx ./output/include/bx + cp -r ./bgfx/include/* ./output/include/bgfx + cp -r ./bx/platform.h ./output/include/bx + with: + path: . + - uses: actions/upload-artifact@v1 + with: + name: output + path: ./output From 39c5250ddf41e3663c5b5e061362c37ff6cbdae1 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 00:19:36 -0500 Subject: [PATCH 13/21] Fixed some invalid syntax. --- .github/workflows/ccpp.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index bc84bd3584..9e096efa3c 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -46,7 +46,7 @@ jobs: run: make ${{matrix.compiler}}-${{matrix.config}} release: runs-on: ubuntu-latest - requires: [build] + needs: build steps: - uses: actions/checkout@v1 with: @@ -61,8 +61,7 @@ jobs: mkdir -p ./output/include/bgfx ./output/include/bx cp -r ./bgfx/include/* ./output/include/bgfx cp -r ./bx/platform.h ./output/include/bx - with: - path: . + path: . - uses: actions/upload-artifact@v1 with: name: output From 4c5c235d3dc337fae5a450b9f78940af68fb48e6 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 00:21:05 -0500 Subject: [PATCH 14/21] More fixes. --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 9e096efa3c..d1f51441b3 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -61,7 +61,7 @@ jobs: mkdir -p ./output/include/bgfx ./output/include/bx cp -r ./bgfx/include/* ./output/include/bgfx cp -r ./bx/platform.h ./output/include/bx - path: . + working-directory: . - uses: actions/upload-artifact@v1 with: name: output From a9cfcd85932d12be6b74f0c18f8cd1ccbe7dee9e Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 09:48:06 -0500 Subject: [PATCH 15/21] Testing only artifact packaging. --- .github/workflows/ccpp.yml | 88 +++++++++++++++++++------------------- 1 file changed, 45 insertions(+), 43 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index d1f51441b3..ab7d78b249 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -3,50 +3,50 @@ name: C/C++ CI on: [push] jobs: - build: - strategy: - matrix: - platform: [mac, linux] - include: - - platform: mac - compiler: osx - config: release64 - image: macos-latest - - platform: linux - compiler: linux - config: release64 - image: ubuntu-latest - # - platform: windows - # compiler: vs2017 - # config: release64 - # image: windows-latest - runs-on: ${{ matrix.image }} - steps: - - uses: actions/checkout@v1 - with: - path: ./bgfx - - uses: actions/checkout@v1 - with: - path: ./bx - repository: bkaradzic/bx - ref: refs/heads/master - - uses: actions/checkout@v1 - with: - path: ./bimg - repository: bkaradzic/bimg - ref: refs/heads/master - # TODO: cache this dependency. - - name: Install build dependencies (Linux). - # See: https://bkaradzic.github.io/bgfx/build.html#linux - run: sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev - if: matrix.platform == 'linux' - - name: Generate project files. - run: make - - name: Compile. - run: make ${{matrix.compiler}}-${{matrix.config}} + # build: + # strategy: + # matrix: + # platform: [mac, linux] + # include: + # - platform: mac + # compiler: osx + # config: release64 + # image: macos-latest + # - platform: linux + # compiler: linux + # config: release64 + # image: ubuntu-latest + # # - platform: windows + # # compiler: vs2017 + # # config: release64 + # # image: windows-latest + # runs-on: ${{ matrix.image }} + # steps: + # - uses: actions/checkout@v1 + # with: + # path: ./bgfx + # - uses: actions/checkout@v1 + # with: + # path: ./bx + # repository: bkaradzic/bx + # ref: refs/heads/master + # - uses: actions/checkout@v1 + # with: + # path: ./bimg + # repository: bkaradzic/bimg + # ref: refs/heads/master + # # TODO: cache this dependency. + # - name: Install build dependencies (Linux). + # # See: https://bkaradzic.github.io/bgfx/build.html#linux + # run: sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev + # if: matrix.platform == 'linux' + # - name: Generate project files. + # run: make + # - name: Compile. + # run: make ${{matrix.compiler}}-${{matrix.config}} release: runs-on: ubuntu-latest - needs: build + #needs: build steps: - uses: actions/checkout@v1 with: @@ -58,10 +58,12 @@ jobs: ref: refs/heads/master - name: Copy include headers to build output. run: | + ls . + pwd mkdir -p ./output/include/bgfx ./output/include/bx cp -r ./bgfx/include/* ./output/include/bgfx cp -r ./bx/platform.h ./output/include/bx - working-directory: . + # working-directory: . - uses: actions/upload-artifact@v1 with: name: output From dbda42841a020e81f20ab169e2df51c0cac773f7 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 09:51:23 -0500 Subject: [PATCH 16/21] Fixes to release workflow. --- .github/workflows/ccpp.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index ab7d78b249..0dd7f9852c 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -50,12 +50,14 @@ jobs: steps: - uses: actions/checkout@v1 with: + fetch-depth: 1 path: ./bgfx - uses: actions/checkout@v1 with: + fetch-depth: 1 path: ./bx - repository: bkaradzic/bx ref: refs/heads/master + repository: bkaradzic/bx - name: Copy include headers to build output. run: | ls . @@ -63,7 +65,7 @@ jobs: mkdir -p ./output/include/bgfx ./output/include/bx cp -r ./bgfx/include/* ./output/include/bgfx cp -r ./bx/platform.h ./output/include/bx - # working-directory: . + working-directory: ${{ github.workspace }} - uses: actions/upload-artifact@v1 with: name: output From 06e8580a4dc5b7e0119bd1630d44fd2a68faf16c Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 09:54:27 -0500 Subject: [PATCH 17/21] Added a fix. --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 0dd7f9852c..7625ff9e85 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -65,7 +65,7 @@ jobs: mkdir -p ./output/include/bgfx ./output/include/bx cp -r ./bgfx/include/* ./output/include/bgfx cp -r ./bx/platform.h ./output/include/bx - working-directory: ${{ github.workspace }} + working-directory: ${{ github.workspace }}/.. - uses: actions/upload-artifact@v1 with: name: output From 8aaf321aa1763474fb00e126e93426d5724937db Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 09:57:19 -0500 Subject: [PATCH 18/21] Added bx fix. --- .github/workflows/ccpp.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 7625ff9e85..e861f4c8ae 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -60,11 +60,9 @@ jobs: repository: bkaradzic/bx - name: Copy include headers to build output. run: | - ls . - pwd mkdir -p ./output/include/bgfx ./output/include/bx cp -r ./bgfx/include/* ./output/include/bgfx - cp -r ./bx/platform.h ./output/include/bx + cp -r ./bx/include/platform.h ./output/include/bx working-directory: ${{ github.workspace }}/.. - uses: actions/upload-artifact@v1 with: From b0da415ee053d65470172cf8af4bef0f29e0f1f8 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 10:00:03 -0500 Subject: [PATCH 19/21] Another path fix. --- .github/workflows/ccpp.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index e861f4c8ae..bdc944a6e6 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -61,8 +61,8 @@ jobs: - name: Copy include headers to build output. run: | mkdir -p ./output/include/bgfx ./output/include/bx - cp -r ./bgfx/include/* ./output/include/bgfx - cp -r ./bx/include/platform.h ./output/include/bx + cp -r ./bgfx/include/bgfx/* ./output/include/bgfx + cp -r ./bx/include/bx/platform.h ./output/include/bx working-directory: ${{ github.workspace }}/.. - uses: actions/upload-artifact@v1 with: From 66fd1e079849b4c0270ef2761e54866fb9d025d1 Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 10:04:02 -0500 Subject: [PATCH 20/21] Fixed another path issue. --- .github/workflows/ccpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index bdc944a6e6..3e9be5de31 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -67,4 +67,4 @@ jobs: - uses: actions/upload-artifact@v1 with: name: output - path: ./output + path: ../output From df5fa1b655f01becd63aade8931f0ef75fbf315a Mon Sep 17 00:00:00 2001 From: Pras Velagapudi Date: Thu, 5 Dec 2019 10:28:54 -0500 Subject: [PATCH 21/21] Added back main build step. --- .github/workflows/ccpp.yml | 113 +++++++++++++++++++++++-------------- 1 file changed, 71 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ccpp.yml b/.github/workflows/ccpp.yml index 3e9be5de31..77712f7512 100644 --- a/.github/workflows/ccpp.yml +++ b/.github/workflows/ccpp.yml @@ -3,50 +3,79 @@ name: C/C++ CI on: [push] jobs: - # build: - # strategy: - # matrix: - # platform: [mac, linux] - # include: - # - platform: mac - # compiler: osx - # config: release64 - # image: macos-latest - # - platform: linux - # compiler: linux - # config: release64 - # image: ubuntu-latest - # # - platform: windows - # # compiler: vs2017 - # # config: release64 - # # image: windows-latest - # runs-on: ${{ matrix.image }} - # steps: - # - uses: actions/checkout@v1 - # with: - # path: ./bgfx - # - uses: actions/checkout@v1 - # with: - # path: ./bx - # repository: bkaradzic/bx - # ref: refs/heads/master - # - uses: actions/checkout@v1 - # with: - # path: ./bimg - # repository: bkaradzic/bimg - # ref: refs/heads/master - # # TODO: cache this dependency. - # - name: Install build dependencies (Linux). - # # See: https://bkaradzic.github.io/bgfx/build.html#linux - # run: sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev - # if: matrix.platform == 'linux' - # - name: Generate project files. - # run: make - # - name: Compile. - # run: make ${{matrix.compiler}}-${{matrix.config}} + build: + strategy: + matrix: + platform: [darwin, linux] + include: + - platform: darwin + arch: x64 + build: osx64_clang + config: osx-release64 + image: macos-latest + - platform: linux + arch: x64 + build: linux64_gcc + config: linux-release64 + image: ubuntu-latest + # - platform: windows + # arch: x64 + # build: win64_vs2017 + # config: vs2017-release64 + # image: windows-latest + runs-on: ${{ matrix.image }} + steps: + - name: Checkout bgfx. + uses: actions/checkout@v1 + with: + fetch-depth: 1 + path: ./bgfx + - name: Checkout bx. + uses: actions/checkout@v1 + with: + fetch-depth: 1 + path: ./bx + ref: refs/heads/master + repository: bkaradzic/bx + - name: Checkout bImg. + uses: actions/checkout@v1 + with: + fetch-depth: 1 + path: ./bimg + ref: refs/heads/master + repository: bkaradzic/bimg + # TODO: cache this dependency. + - name: Install build dependencies (Linux). + if: matrix.platform == 'linux' + # See: https://bkaradzic.github.io/bgfx/build.html#linux + run: sudo apt-get install libgl1-mesa-dev x11proto-core-dev libx11-dev + - name: Generate project files. + run: make + - name: Compile. + run: make ${{matrix.config}} + - name: Fix rpath in OSX. + if: matrix.platform == 'darwin' + run: install_name_tool -id "@rpath/libbgfx-shared-libRelease.dylib" ./.build/${{ matrix.build }}/bin/libbgfx-shared-libRelease.dylib + - name: Copy relevant binaries to build artifact. + run: | + mkdir -p ../output/ + cp -r ./.build/${{ matrix.build }}/bin/libbgfx-shared-libRelease* ../output/ + cp -r ./.build/${{ matrix.build }}/bin/shadercRelease* ../output/ + cp -r ./.build/${{ matrix.build }}/bin/texturecRelease* ../output/ + - name: Upload binaries as artifact. + uses: actions/upload-artifact@v1 + with: + name: binaries-${{ matrix.platform }}-${{ matrix.arch }} + path: ../output + - name: Upload failed build directory. + if: failure() + uses: actions/upload-artifact@v1 + with: + name: debug-${{ matrix.platform }}-${{ matrix.arch }} + path: . release: runs-on: ubuntu-latest - #needs: build + needs: build steps: - uses: actions/checkout@v1 with: