-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #685 from tcsabina/master
CI/CD Pipelines
- Loading branch information
Showing
8 changed files
with
230 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: build and deploy snapshots | ||
on: | ||
release: | ||
types: [published] | ||
jobs: | ||
build: | ||
if: github.repository == 'QW-Group/ezquake-source' | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [windows-glsl-x64, windows-opengl-x64, windows-combined-x64] | ||
include: | ||
- target: windows-glsl-x64 | ||
config: rls-modern | ||
platform: x64 | ||
- target: windows-opengl-x64 | ||
config: rls-classic | ||
platform: x64 | ||
- target: windows-combined-x64 | ||
config: rls-all | ||
platform: x64 | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Build txt2c | ||
run: msbuild misc\vstudio\txt2c\txt2c.vcxproj -t:rebuild -property:Configuration=Release | ||
|
||
- name: Make dir | ||
run: mkdir .vs | ||
|
||
- name: Copy txt2c | ||
run: cp misc\vstudio\txt2c\.vs\txt2c.exe .vs\ | ||
|
||
- name: Build ezquake | ||
run: msbuild ezQuake.vcxproj -t:rebuild -property:Configuration=${{ matrix.config }} -property:Platform=${{ matrix.platform }} | ||
|
||
- name: Create checksum | ||
run: | | ||
md5sum .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.exe > .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.md5 | ||
- name: Invoke msys | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
install: openssh | ||
|
||
- name: Setup SSH | ||
shell: msys2 {0} | ||
env: | ||
SSH_AUTH_SOCK: C:\ssh_agent.sock | ||
run: | | ||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | ||
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" | ||
- name: Set date | ||
shell: msys2 {0} | ||
run: | | ||
#timedatectl set-timezone Europe/Amsterdam | ||
export TZ=CET-1CEST | ||
echo "DATE=$(date "+%Y%m%d-%H%M%S")" >> $GITHUB_ENV | ||
- name: Deploy | ||
shell: msys2 {0} | ||
env: | ||
SSH_AUTH_SOCK: C:\ssh_agent.sock | ||
run: | | ||
mkdir -p upload/releases/${{ matrix.platform }}/${{ matrix.config }} | ||
mkdir -p upload/releases/latest/${{ matrix.platform }}/${{ matrix.config }} | ||
cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.exe upload/releases/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.exe | ||
cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.md5 upload/releases/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.md5 | ||
cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.exe upload/releases/latest/${{ matrix.platform }}/${{ matrix.config }}/ezquake.exe | ||
cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.md5 upload/releases/latest/${{ matrix.platform }}/${{ matrix.config }}/ezquake.md5 | ||
sftp -rp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null' -P ${{ secrets.SFTP_PORT }} ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:/releases <<< $'put -rp upload/releases/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: build and deploy snapshots | ||
on: [push] | ||
jobs: | ||
build: | ||
if: github.repository == 'QW-Group/ezquake-source' | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [windows-glsl-x64, windows-opengl-x64, windows-combined-x64] | ||
include: | ||
- target: windows-glsl-x64 | ||
config: rls-modern | ||
platform: x64 | ||
- target: windows-opengl-x64 | ||
config: rls-classic | ||
platform: x64 | ||
- target: windows-combined-x64 | ||
config: rls-all | ||
platform: x64 | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Build txt2c | ||
run: msbuild misc\vstudio\txt2c\txt2c.vcxproj -t:rebuild -property:Configuration=Release | ||
|
||
- name: Make dir | ||
run: mkdir .vs | ||
|
||
- name: Copy txt2c | ||
run: cp misc\vstudio\txt2c\.vs\txt2c.exe .vs\ | ||
|
||
- name: Build ezquake | ||
run: msbuild ezQuake.vcxproj -t:rebuild -property:Configuration=${{ matrix.config }} -property:Platform=${{ matrix.platform }} | ||
|
||
- name: Create checksum | ||
run: | | ||
md5sum .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.exe > .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.md5 | ||
- name: Invoke msys | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
install: openssh | ||
|
||
- name: Setup SSH | ||
shell: msys2 {0} | ||
env: | ||
SSH_AUTH_SOCK: C:\ssh_agent.sock | ||
run: | | ||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | ||
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}" | ||
- name: Set date | ||
shell: msys2 {0} | ||
run: | | ||
#timedatectl set-timezone Europe/Amsterdam | ||
export TZ=CET-1CEST | ||
echo "DATE=$(date "+%Y%m%d-%H%M%S")" >> $GITHUB_ENV | ||
- name: Deploy | ||
shell: msys2 {0} | ||
env: | ||
SSH_AUTH_SOCK: C:\ssh_agent.sock | ||
run: | | ||
mkdir -p upload/snapshots/${{ matrix.platform }}/${{ matrix.config }} | ||
mkdir -p upload/snapshots/latest/${{ matrix.platform }}/${{ matrix.config }} | ||
cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.exe upload/snapshots/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.exe | ||
cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.md5 upload/snapshots/${{ matrix.platform }}/${{ matrix.config }}/${{ env.DATE }}_${GITHUB_SHA::7}_ezquake.md5 | ||
cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.exe upload/snapshots/latest/${{ matrix.platform }}/${{ matrix.config }}/ezquake.exe | ||
cp .vs/${{ matrix.platform }}/${{ matrix.config }}/Output/ezQuake.md5 upload/snapshots/latest/${{ matrix.platform }}/${{ matrix.config }}/ezquake.md5 | ||
sftp -rp -o 'StrictHostKeyChecking no' -o 'UserKnownHostsFile /dev/null' -P ${{ secrets.SFTP_PORT }} ${{ secrets.SFTP_USERNAME }}@${{ secrets.SFTP_HOST }}:/snapshots <<< $'put -rp upload/snapshots/*' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: build targets | ||
on: [pull_request] | ||
jobs: | ||
build: | ||
if: github.repository == 'QW-Group/ezquake-source' | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
target: [windows-glsl-x64, windows-opengl-x64, windows-combined-x64] | ||
include: | ||
- target: windows-glsl-x64 | ||
config: rls-modern | ||
platform: x64 | ||
- target: windows-opengl-x64 | ||
config: rls-classic | ||
platform: x64 | ||
- target: windows-combined-x64 | ||
config: dbg-all | ||
platform: x64 | ||
|
||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Build txt2c | ||
run: msbuild misc\vstudio\txt2c\txt2c.vcxproj -t:rebuild -property:Configuration=Release | ||
|
||
- name: Make dir | ||
run: mkdir .vs | ||
|
||
- name: Copy txt2c | ||
run: cp misc\vstudio\txt2c\.vs\txt2c.exe .vs\ | ||
|
||
- name: Build ezquake | ||
run: msbuild ezQuake.vcxproj -t:rebuild -property:Configuration=${{ matrix.config }} -property:Platform=${{ matrix.platform }} | ||
|
||
- name: Archive client | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.target }} | ||
path: .vs\${{ matrix.platform }}\${{ matrix.config }}\Output\ezQuake.exe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
.* | ||
!.travis.yml | ||
ezquake | ||
ezquake.exe | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.