Merge pull request #3681 from myk002/myk_cache_intermediate

archive artifacts before upload
develop
Myk 2023-08-19 01:58:14 -07:00 committed by GitHub
commit b21eef9573
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 47 additions and 18 deletions

@ -152,12 +152,22 @@ jobs:
path: ~/.cache/ccache path: ~/.cache/ccache
key: linux-gcc-${{ inputs.gcc-ver }}-${{ inputs.cache-id }}-${{ github.sha }} key: linux-gcc-${{ inputs.gcc-ver }}-${{ inputs.cache-id }}-${{ github.sha }}
- name: Format artifact name - name: Format artifact name
if: inputs.append-date-and-hash if: inputs.artifact-name
id: artifactname id: artifactname
run: echo name=${{ inputs.artifact-name }}-$(date +%Y%m%d)-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT run: |
if test "false" = "${{ inputs.append-date-and-hash }}"; then
echo name=${{ inputs.artifact-name }} >> $GITHUB_OUTPUT
else
echo name=${{ inputs.artifact-name }}-$(date +%Y%m%d)-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
fi
- name: Prep artifact
if: inputs.artifact-name
run: |
cd build/image
tar cjf ../../${{ steps.artifactname.outputs.name }}.tar.bz2 .
- name: Upload artifact - name: Upload artifact
if: inputs.artifact-name if: inputs.artifact-name
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ inputs.append-date-and-hash && steps.artifactname.outputs.name || inputs.artifact-name }} name: ${{ steps.artifactname.outputs.name }}
path: build/image/* path: ${{ steps.artifactname.outputs.name }}.tar.bz2

@ -111,12 +111,22 @@ jobs:
path: build/win64-cross/ccache path: build/win64-cross/ccache
key: win-msvc-${{ inputs.cache-id }}-${{ github.sha }} key: win-msvc-${{ inputs.cache-id }}-${{ github.sha }}
- name: Format artifact name - name: Format artifact name
if: inputs.append-date-and-hash if: inputs.artifact-name
id: artifactname id: artifactname
run: echo "name=${{ inputs.artifact-name }}-$(date +%Y%m%d)-$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT" run: |
if test "false" = "${{ inputs.append-date-and-hash }}"; then
echo name=${{ inputs.artifact-name }} >> $GITHUB_OUTPUT
else
echo name=${{ inputs.artifact-name }}-$(date +%Y%m%d)-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT
fi
- name: Prep artifact
if: inputs.artifact-name
run: |
cd build/win64-cross/output
tar cjf ../../../${{ steps.artifactname.outputs.name }}.tar.bz2 .
- name: Upload artifact - name: Upload artifact
if: inputs.artifact-name if: inputs.artifact-name
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3
with: with:
name: ${{ inputs.append-date-and-hash && steps.artifactname.outputs.name || inputs.artifact-name }} name: ${{ steps.artifactname.outputs.name }}
path: build/win64-cross/output/* path: ${{ steps.artifactname.outputs.name }}.tar.bz2

@ -51,16 +51,15 @@ jobs:
cat release_body.md cat release_body.md
- name: Stage release - name: Stage release
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
- name: Prep artifact directory - name: Prep artifacts
run: mkdir artifacts
- name: Create win64 release archive
run: | run: |
mkdir artifacts
cd dfhack-windows64-build cd dfhack-windows64-build
tar xjf dfhack-windows64-build.tar.bz2
rm dfhack-windows64-build.tar.bz2
zip -qr ../artifacts/dfhack-${{ steps.gettag.outputs.name }}-Windows-64bit.zip . zip -qr ../artifacts/dfhack-${{ steps.gettag.outputs.name }}-Windows-64bit.zip .
- name: Create linux64 release archive cd ../dfhack-linux64-build
run: | mv dfhack-linux64-build.tar.bz2 ../artifacts/dfhack-${{ steps.gettag.outputs.name }}-Linux-64bit.tar.bz2
cd dfhack-linux64-build
tar cjf ../artifacts/dfhack-${{ steps.gettag.outputs.name }}-Linux-64bit.tar.bz2 .
- name: Create or update GitHub release - name: Create or update GitHub release
uses: ncipollo/release-action@v1 uses: ncipollo/release-action@v1
with: with:

@ -68,8 +68,16 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
concurrency: steam concurrency: steam
steps: steps:
- name: Stage depot files - name: Download depot files
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
- name: Stage depot files
run: |
for name in common win64 linux64; do
cd ${name}-depot
tar xjf ${name}-depot.tar.bz2
rm ${name}-depot.tar.bz2
cd ..
done
- name: Steam deploy - name: Steam deploy
uses: game-ci/steam-deploy@v3 uses: game-ci/steam-deploy@v3
with: with:

@ -110,11 +110,13 @@ jobs:
mkdir -p ${{ env.DF_FOLDER }}/dfhack-config/init mkdir -p ${{ env.DF_FOLDER }}/dfhack-config/init
cd data/dfhack-config/init cd data/dfhack-config/init
for fname in *.init; do touch ../../../${{ env.DF_FOLDER }}/dfhack-config/init/$fname; done for fname in *.init; do touch ../../../${{ env.DF_FOLDER }}/dfhack-config/init/$fname; done
- name: Install DFHack - name: Download DFHack
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:
name: test-${{ matrix.compiler }} name: test-${{ matrix.compiler }}
path: ${{ env.DF_FOLDER }} - name: Install DFHack
shell: bash
run: tar xjf test-${{ matrix.compiler }}.tar.bz2 -C ${{ env.DF_FOLDER }}
- name: Run lua tests - name: Run lua tests
timeout-minutes: 10 timeout-minutes: 10
run: python ci/run-tests.py --keep-status "${{ env.DF_FOLDER }}" run: python ci/run-tests.py --keep-status "${{ env.DF_FOLDER }}"