From c70f20b6a978244b4ec6cc3b7bec3086881adbec Mon Sep 17 00:00:00 2001 From: Johnathon Selstad Date: Wed, 16 Nov 2022 13:38:17 -0800 Subject: [PATCH 1/4] Test building in Github Actions --- .github/workflows/main.yml | 67 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..d7b54ac --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,67 @@ +name: Build libsm64 + +on: + push: + branches: [master] + +jobs: + Build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + + - name: Install SDL2 and GLEW + if: runner.os == 'Linux' + run: | + sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu `lsb_release -sc` main universe restricted multiverse" + sudo apt-get update -y -qq + sudo apt-get install libsdl2-dev libglew-dev + + - name: Print Folder Structure + if: runner.os == 'Linux' + run: ls -l + + - name: Linux - Build Base Binary + if: runner.os == 'Linux' + run: make + + - name: Print Folder Structure + if: runner.os == 'Linux' + run: | + ls -l + ls -l ./build + ls -l ./dist + + #- name: Linux - Upload Build + # uses: actions/upload-artifact@v3 + # if: runner.os == 'Linux' + # with: + # name: sort_cuda + # path: | + # ./dist/libsm64.h + # ./dist/libsm64.so + + #Release: + # name: "Snapshot Release" + # runs-on: "ubuntu-latest" + # needs: Build + + # steps: + # - name: Download artifacts + # uses: actions/download-artifact@v3 + + # - name: Create a Release + # uses: "marvinpinto/action-automatic-releases@latest" + # with: + # repo_token: "${{ secrets.GITHUB_TOKEN }}" + # automatic_release_tag: "latest" + # prerelease: true + # title: "Snapshot Build" + # files: | + # /home/runner/work/sort_cuda/sort_cuda/sort_std + # /home/runner/work/sort_cuda/sort_cuda/sort_cuda From 4cb4ec4276fd4c1a37a0ed5e75967c76bf0da5cb Mon Sep 17 00:00:00 2001 From: Johnathon Selstad Date: Wed, 16 Nov 2022 13:44:15 -0800 Subject: [PATCH 2/4] Build test program; upload binaries --- .github/workflows/main.yml | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d7b54ac..d2e89cf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,29 +22,31 @@ jobs: sudo apt-get update -y -qq sudo apt-get install libsdl2-dev libglew-dev - - name: Print Folder Structure - if: runner.os == 'Linux' - run: ls -l + #- name: Print Folder Structure + # if: runner.os == 'Linux' + # run: ls -l - name: Linux - Build Base Binary - if: runner.os == 'Linux' - run: make - - - name: Print Folder Structure if: runner.os == 'Linux' run: | - ls -l - ls -l ./build - ls -l ./dist + make lib + make test - #- name: Linux - Upload Build - # uses: actions/upload-artifact@v3 + #- name: Print Folder Structure # if: runner.os == 'Linux' - # with: - # name: sort_cuda - # path: | - # ./dist/libsm64.h - # ./dist/libsm64.so + # run: | + # ls -l + # ls -l ./build + # ls -l ./dist + + - name: Linux - Upload Build + uses: actions/upload-artifact@v3 + if: runner.os == 'Linux' + with: + name: libsm64 + path: | + ./dist + ./build #Release: # name: "Snapshot Release" From 79c80f95d7fa57d54343d6518664f2fc842aaef6 Mon Sep 17 00:00:00 2001 From: Johnathon Selstad Date: Wed, 16 Nov 2022 13:53:31 -0800 Subject: [PATCH 3/4] Add the README to the Uploaded Binaries --- .github/workflows/main.yml | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d2e89cf..f909768 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -22,29 +22,19 @@ jobs: sudo apt-get update -y -qq sudo apt-get install libsdl2-dev libglew-dev - #- name: Print Folder Structure - # if: runner.os == 'Linux' - # run: ls -l - - name: Linux - Build Base Binary if: runner.os == 'Linux' run: | make lib make test - #- name: Print Folder Structure - # if: runner.os == 'Linux' - # run: | - # ls -l - # ls -l ./build - # ls -l ./dist - - name: Linux - Upload Build uses: actions/upload-artifact@v3 if: runner.os == 'Linux' with: - name: libsm64 + name: libsm64_linux path: | + ./README.md ./dist ./build @@ -65,5 +55,6 @@ jobs: # prerelease: true # title: "Snapshot Build" # files: | - # /home/runner/work/sort_cuda/sort_cuda/sort_std - # /home/runner/work/sort_cuda/sort_cuda/sort_cuda + # ./README.md + # ./dist + # ./build From 8a838502b9942886213e84cb108414f48029ab32 Mon Sep 17 00:00:00 2001 From: Johnathon Selstad Date: Wed, 16 Nov 2022 14:02:53 -0800 Subject: [PATCH 4/4] Also have builds trigger in pull requests --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f909768..b7b3eca 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,6 +1,7 @@ name: Build libsm64 on: + pull_request: push: branches: [master]