From d59bcdb6769d6ce897f883f8ddb1e54562793664 Mon Sep 17 00:00:00 2001 From: Jon Michael Aanes Date: Thu, 4 Apr 2024 00:02:11 +0200 Subject: [PATCH] Load test as separate file --- .gitea/workflows/love2d-load-test.yaml | 60 +++++++++++++++++++++++ .gitea/workflows/love2d.yaml | 68 +++++++++++++++++++++++--- 2 files changed, 122 insertions(+), 6 deletions(-) create mode 100644 .gitea/workflows/love2d-load-test.yaml diff --git a/.gitea/workflows/love2d-load-test.yaml b/.gitea/workflows/love2d-load-test.yaml new file mode 100644 index 0000000..5a44cf8 --- /dev/null +++ b/.gitea/workflows/love2d-load-test.yaml @@ -0,0 +1,60 @@ +name: LÖVE Game Load Test + +on: + workflow_call: + inputs: + VERSION: + required: true + ITCH_USERNAME: + required: false + ITCH_GAME_ID: + required: false + STEAM_APP_ID: + required: false + STEAM_RELEASE_BRANCH: + required: false + secrets: + PIPELINE_WORKER_SSH_KEY: + type: string + required: true + PIPELINE_WORKER_KNOWN_HOSTS: + type: string + required: true + PIPELINE_WORKER_USERNAME: + type: string + required: true + BUTLER_API_KEY: + type: string + required: false + STEAM_USERNAME: + type: string + required: false + STEAM_CONFIG_VDF: + type: string + required: false + +jobs: + game-load-test: + runs-on: ubuntu-latest + steps: + - run: apt-get update + - run: apt-get install -y fish luajit optipng ffmpeg zip rsync love + - name: Setting up SSH + uses: https://github.com/shimataro/ssh-key-action@v2.5.1 + with: + key: ${{ secrets.PIPELINE_WORKER_SSH_KEY }} + name: id_rsa + known_hosts: ${{ secrets.PIPELINE_WORKER_KNOWN_HOSTS }} + config: | + Host gitfub + HostName gitfub.space + User ${{ secrets.PIPELINE_WORKER_USERNAME }} + - name: Check out repository + uses: actions/checkout@v3 + +# Create artifacts + + - name: Building game + run: fish ${{ github.workspace }}/assemble love + - name: Trying to start game + run: LIBGL_ALWAYS_SOFTWARE=1 love bin/love diff --git a/.gitea/workflows/love2d.yaml b/.gitea/workflows/love2d.yaml index c2df524..b3c65cf 100644 --- a/.gitea/workflows/love2d.yaml +++ b/.gitea/workflows/love2d.yaml @@ -34,11 +34,11 @@ on: required: false jobs: - game-load-test: + package: runs-on: ubuntu-latest steps: - run: apt-get update - - run: apt-get install -y fish luajit optipng ffmpeg zip rsync love + - run: apt-get install -y fish luajit optipng ffmpeg zip rsync - name: Setting up SSH uses: https://github.com/shimataro/ssh-key-action@v2.5.1 with: @@ -54,7 +54,63 @@ jobs: # Create artifacts - - name: Building game - run: fish ${{ github.workspace }}/assemble love - - name: Trying to start game - run: LIBGL_ALWAYS_SOFTWARE=1 love bin/love + - name: Creating binaries + run: fish ${{ github.workspace }}/assemble release + +# Upload produced artifacts + + - name: Uploading artifacts (love) + uses: actions/upload-artifact@v3 + with: + name: "${{ github.event.repository.name }}.love" + path: "${{ github.workspace }}/bin/*.love" + if-no-files-found: error + - name: Uploading artifacts (win64) + uses: actions/upload-artifact@v3 + with: + name: "${{ github.event.repository.name }}-win64.zip" + path: "${{ github.workspace }}/bin/*-win64.zip" + if-no-files-found: error + +# Determine files + + - name: Finding love + id: findfiles + run: | + echo "love="$(ls bin/*.love) >> "$GITHUB_OUTPUT" + echo "win64="$(ls bin/*-win64.zip) >> "$GITHUB_OUTPUT" + +# Upload to itch + + - uses: KikimoraGames/itch-publish@v0.0.3 + if: always() && github.event_name == 'release' && inputs.ITCH_GAME_ID + with: + butlerApiKey: ${{ secrets.BUTLER_API_KEY }} + gameData: ${{ steps.findfiles.outputs.love }} + itchUsername: ${{ inputs.ITCH_USERNAME }} + itchGameId: ${{ inputs.ITCH_GAME_ID }} + buildChannel: love-linux-mac + + - uses: KikimoraGames/itch-publish@v0.0.3 + if: always() && github.event_name == 'release' && inputs.ITCH_GAME_ID + with: + butlerApiKey: ${{ secrets.BUTLER_API_KEY }} + gameData: ${{ steps.findfiles.outputs.win64 }} + itchUsername: ${{ inputs.ITCH_USERNAME }} + itchGameId: ${{ inputs.ITCH_GAME_ID }} + buildChannel: win64 + +# Upload to steam + + - uses: game-ci/steam-deploy@v3 + if: always() && github.event_name == 'release' && inputs.STEAM_APP_ID + with: + username: ${{ secrets.STEAM_USERNAME }} + configVdf: ${{ secrets.STEAM_CONFIG_VDF }} + appId: ${{ inputs.STEAM_APP_ID }} + buildDescription: ${{ inputs.VERSION }} + rootPath: bin + #depot1Path: StandaloneWindows64 + depot2Path: build-win64 + releaseBranch: ${{ secrets.STEAM_RELEASE_BRANCH }} +