diff --git a/.github/workflows/linux-workflow.yml b/.github/workflows/linux-workflow.yml index 1e2c464b38..b719ea24f4 100644 --- a/.github/workflows/linux-workflow.yml +++ b/.github/workflows/linux-workflow.yml @@ -53,10 +53,21 @@ jobs: # echo "$GITHUB_CONTEXT" # echo ${{ github.event.pull_request.title }} - - name: Checkout Repository & Submodules + - name: Checkout Repository uses: actions/checkout@v2 + + - name: Cache Submodules + id: cache-submodules + uses: actions/cache@v2 with: - submodules: true + key: submodules-${{ hashFiles('./.gitmodules') }} + path: | + ./3rdparty/xz + ./3rdparty/gtest + + - name: Checkout Submodules + if: steps.cache-submodules.outputs.cache-hit != 'true' + run: git submodule update --init --recursive # -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/ - name: Prepare ccache timestamp diff --git a/.github/workflows/windows-workflow.yml b/.github/workflows/windows-workflow.yml index 54f169a64e..fe41ff9e63 100644 --- a/.github/workflows/windows-workflow.yml +++ b/.github/workflows/windows-workflow.yml @@ -54,27 +54,41 @@ jobs: # run: | # echo "$GITHUB_CONTEXT" - - name: Checkout Repository & Submodules + - name: Checkout Repository uses: actions/checkout@v2 + + - name: Cache Submodules + id: cache-submodules + uses: actions/cache@v2 with: - submodules: true + key: submodules-${{ hashFiles('./.gitmodules') }} + path: | + ./3rdparty/xz + ./3rdparty/gtest + - name: Checkout Submodules + if: steps.cache-submodules.outputs.cache-hit != 'true' + run: git submodule update --init --recursive - name: Prepare Artifact Git Info shell: bash run: | echo "##[set-output name=branch;]${GITHUB_REF#refs/heads/}" - echo "##[set-output name=short-sha;]$(git rev-parse --short "$GITHUB_SHA")" + ARTIFACT_NAME="commit-$(git rev-parse --short "$GITHUB_SHA")" if [ ${{ github.event_name == 'pull_request' }} ]; then - echo "##[set-output name=file-name-metadata;]pr-${{ github.event.pull_request.number }}" + echo "##[set-output name=short-sha;]$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")" + if [ ! -z "${{ github.event.pull_request.number }}" ]; then + ARTIFACT_NAME="pr-${{ github.event.pull_request.number }}-commit-$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")" + fi else - echo "##[set-output name=file-name-metadata;]commit-$(git rev-parse --short "$GITHUB_SHA")" + echo "##[set-output name=short-sha;]$(git rev-parse --short "$GITHUB_SHA")" fi + echo "##[set-output name=artifact-metadata;]${ARTIFACT_NAME}" id: git-vars - name: Setup msbuild uses: microsoft/setup-msbuild@v1.0.1 with: - vs-version: 15.0 + vs-version: 16.7 - name: Build PCSX2 run: msbuild "buildbot.xml" /m /v:m /fl1 /t:ReleaseAll /p:Platform=${{ matrix.platform }} @@ -83,5 +97,5 @@ jobs: uses: actions/upload-artifact@v2 continue-on-error: true with: - name: PCSX2-${{ matrix.platform }}-${{ steps.git-vars.outputs.file-name-metadata }} + name: PCSX2-${{ matrix.platform }}-${{ steps.git-vars.outputs.artifact-metadata }} path: bin