From b5981b3caa9c72037c45907b81d903a247cc42e5 Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 19:17:49 -0600 Subject: [PATCH 01/14] Create c-cpp.yml --- .github/workflows/c-cpp.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/c-cpp.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml new file mode 100644 index 0000000000..86525353cd --- /dev/null +++ b/.github/workflows/c-cpp.yml @@ -0,0 +1,24 @@ +name: C/C++ CI + +on: + push: + branches: [ master, cicd ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - name: Install dependancies + run: sudo apt-get -y install build-essential libsdl1.2debian libsdl1.2debian-pulseaudio libsdl1.2-dev libsdl-image1.2 libsdl-image1.2-dev libopenal1 libopenal-dev libvorbis-dev libcurl3 libcurl4-openssl-dev + - uses: actions/checkout@v2 + - name: make + run: make server + working-directory: source/src + - uses: actions/upload-artifact@main + with: + name: server artifact + path: source/src/ac_server From ab583f35bc5d67eb659309b279a6cd3f96b6494e Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 19:19:22 -0600 Subject: [PATCH 02/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 86525353cd..0b8c6c1f3c 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -19,6 +19,6 @@ jobs: run: make server working-directory: source/src - uses: actions/upload-artifact@main - with: - name: server artifact - path: source/src/ac_server + with: + name: server artifact + path: source/src/ac_server From 4bd8627ef774c3a0e006f49f24a0aabd314692ca Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 19:21:09 -0600 Subject: [PATCH 03/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 0b8c6c1f3c..9f3a36c688 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Install dependancies - run: sudo apt-get -y install build-essential libsdl1.2debian libsdl1.2debian-pulseaudio libsdl1.2-dev libsdl-image1.2 libsdl-image1.2-dev libopenal1 libopenal-dev libvorbis-dev libcurl3 libcurl4-openssl-dev + run: sudo apt-get -y install build-essential libsdl1.2debian libsdl1.2debian libsdl1.2-dev libsdl-image1.2 libsdl-image1.2-dev libopenal1 libopenal-dev libvorbis-dev libcurl4 libcurl4-openssl-dev - uses: actions/checkout@v2 - name: make run: make server From 28ff3c372c418c4da0b66224c670a1f90500b2ab Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:14:38 -0600 Subject: [PATCH 04/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 9f3a36c688..89de16ded3 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -22,3 +22,11 @@ jobs: with: name: server artifact path: source/src/ac_server + - name: copy file via ssh password + uses: appleboy/scp-action@master + with: + host: ${{ secrets.SSH_HOST }} + username: ${{ secrets.SSH_USERNAME }} + key: ${{ secrets.SSH_KEY }} + source: "source/src/ac_server" + target: "~/github_upload/" From fca3ea4ce97eb174ca2c7686392c50c4f510f517 Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:26:27 -0600 Subject: [PATCH 05/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 89de16ded3..b39f874e81 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -8,7 +8,6 @@ on: jobs: build: - runs-on: ubuntu-latest steps: @@ -22,11 +21,22 @@ jobs: with: name: server artifact path: source/src/ac_server - - name: copy file via ssh password + + deploy: + needs: build + runs-on: ubuntu-latest + environment: fruity + + steps: + - uses: actions/download-artifact@main + with: + name: server artifact + path: ac_server + - name: copy file via ssh uses: appleboy/scp-action@master with: host: ${{ secrets.SSH_HOST }} username: ${{ secrets.SSH_USERNAME }} key: ${{ secrets.SSH_KEY }} - source: "source/src/ac_server" + source: "ac_server" target: "~/github_upload/" From 4ca37fffeff9b3380dad892948643bebd8eaea3a Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:34:03 -0600 Subject: [PATCH 06/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index b39f874e81..3449cae893 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -19,7 +19,7 @@ jobs: working-directory: source/src - uses: actions/upload-artifact@main with: - name: server artifact + name: ac_server path: source/src/ac_server deploy: @@ -30,7 +30,7 @@ jobs: steps: - uses: actions/download-artifact@main with: - name: server artifact + name: ac_server path: ac_server - name: copy file via ssh uses: appleboy/scp-action@master @@ -39,4 +39,4 @@ jobs: username: ${{ secrets.SSH_USERNAME }} key: ${{ secrets.SSH_KEY }} source: "ac_server" - target: "~/github_upload/" + target: "~/github_upload/${{GITHUB_SHA}}" From 47dd58c6afddd854982d0f39980184d4fc25bf8f Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:35:41 -0600 Subject: [PATCH 07/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 3449cae893..db0b59eebf 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -39,4 +39,4 @@ jobs: username: ${{ secrets.SSH_USERNAME }} key: ${{ secrets.SSH_KEY }} source: "ac_server" - target: "~/github_upload/${{GITHUB_SHA}}" + target: "~/github_upload/${{env.GITHUB_SHA}}" From 1907a9905c18249031f9ed34b21dc99df0550fa1 Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:42:14 -0600 Subject: [PATCH 08/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index db0b59eebf..d9dd8db9df 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -15,12 +15,12 @@ jobs: run: sudo apt-get -y install build-essential libsdl1.2debian libsdl1.2debian libsdl1.2-dev libsdl-image1.2 libsdl-image1.2-dev libopenal1 libopenal-dev libvorbis-dev libcurl4 libcurl4-openssl-dev - uses: actions/checkout@v2 - name: make - run: make server + run: make server_install working-directory: source/src - uses: actions/upload-artifact@main with: - name: ac_server - path: source/src/ac_server + name: bin + path: bin/ deploy: needs: build @@ -30,13 +30,13 @@ jobs: steps: - uses: actions/download-artifact@main with: - name: ac_server - path: ac_server + name: bin + path: bin - name: copy file via ssh uses: appleboy/scp-action@master with: host: ${{ secrets.SSH_HOST }} username: ${{ secrets.SSH_USERNAME }} key: ${{ secrets.SSH_KEY }} - source: "ac_server" - target: "~/github_upload/${{env.GITHUB_SHA}}" + source: "bin" + target: "~/github_upload/commit_${{env.GITHUB_SHA}}/" From 1f516530621727a1a6a9d83689be51dcd345b354 Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:45:32 -0600 Subject: [PATCH 09/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index d9dd8db9df..d7f23944dd 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/upload-artifact@main with: name: bin - path: bin/ + path: bin/* deploy: needs: build @@ -31,7 +31,7 @@ jobs: - uses: actions/download-artifact@main with: name: bin - path: bin + path: bin/ - name: copy file via ssh uses: appleboy/scp-action@master with: @@ -39,4 +39,4 @@ jobs: username: ${{ secrets.SSH_USERNAME }} key: ${{ secrets.SSH_KEY }} source: "bin" - target: "~/github_upload/commit_${{env.GITHUB_SHA}}/" + target: "~/github_upload/commit_${{github.sha}}/" From 2b14cc90963b70b4799424cb40ae17ff4daa7327 Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:48:54 -0600 Subject: [PATCH 10/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index d7f23944dd..ae5f9948a6 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -15,12 +15,12 @@ jobs: run: sudo apt-get -y install build-essential libsdl1.2debian libsdl1.2debian libsdl1.2-dev libsdl-image1.2 libsdl-image1.2-dev libopenal1 libopenal-dev libvorbis-dev libcurl4 libcurl4-openssl-dev - uses: actions/checkout@v2 - name: make - run: make server_install + run: make server working-directory: source/src - uses: actions/upload-artifact@main with: - name: bin - path: bin/* + name: ac_server + path: source/src/ac_server deploy: needs: build @@ -30,13 +30,13 @@ jobs: steps: - uses: actions/download-artifact@main with: - name: bin - path: bin/ + name: ac_server + path: ac_server - name: copy file via ssh uses: appleboy/scp-action@master with: host: ${{ secrets.SSH_HOST }} username: ${{ secrets.SSH_USERNAME }} key: ${{ secrets.SSH_KEY }} - source: "bin" + source: "ac_server/*" target: "~/github_upload/commit_${{github.sha}}/" From 0ffbaa4845f107d9f12d24fe8840bb4514094e8e Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:52:04 -0600 Subject: [PATCH 11/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index ae5f9948a6..8fc95d4be3 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -38,5 +38,5 @@ jobs: host: ${{ secrets.SSH_HOST }} username: ${{ secrets.SSH_USERNAME }} key: ${{ secrets.SSH_KEY }} - source: "ac_server/*" + source: "ac_server/ac_server" target: "~/github_upload/commit_${{github.sha}}/" From fcdb7e1bc59f489da972ecbcdee90a63cac37052 Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 20:57:26 -0600 Subject: [PATCH 12/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index 8fc95d4be3..d1eabd3d35 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,4 +1,4 @@ -name: C/C++ CI +name: CI/CD on: push: From cf72d2df222a18316af528439a3d0c3f993352f0 Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 21:03:05 -0600 Subject: [PATCH 13/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index d1eabd3d35..a58498cbed 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -32,6 +32,8 @@ jobs: with: name: ac_server path: ac_server + - name: Display structure of downloaded files + run: ls -R - name: copy file via ssh uses: appleboy/scp-action@master with: From 61cfc7f7311e4cd4280d429bea5ee73f5eedae48 Mon Sep 17 00:00:00 2001 From: RonaldReagan Date: Mon, 24 May 2021 21:08:41 -0600 Subject: [PATCH 14/14] Update c-cpp.yml --- .github/workflows/c-cpp.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index a58498cbed..0d457011dd 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -42,3 +42,4 @@ jobs: key: ${{ secrets.SSH_KEY }} source: "ac_server/ac_server" target: "~/github_upload/commit_${{github.sha}}/" + strip_components: 1