actions-linux: Update linux workflow to upload artifacts to release

This commit is contained in:
Tyler Wilding 2021-10-18 00:18:25 -04:00 committed by tellowkrinkle
parent 9d2976cef6
commit c0f83524a9
1 changed files with 54 additions and 54 deletions

View File

@ -6,59 +6,36 @@ on:
push:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.bat'
- '**/*.cmd'
- '**/*.props'
- '**/*.sln'
- '.clang-format'
- '.codacy.yaml'
- '.github/*'
- '.github/workflows/lint-gamedb.yml'
- '.github/workflows/macos-workflow.yml'
- '.github/workflows/pr-triage.yml'
- '.github/workflows/scripts/windows/**'
- '.github/workflows/scripts/validation/**'
- '.github/workflows/windows-workflow.yml'
- '.gitignore'
- 'bin/PCSX2_keys.ini.default'
- 'build.sh'
- 'buildbot.xml'
- 'pcsx2/CDVD/Windows/**'
- 'pcsx2/DEV9/Win32/**'
- 'pcsx2/PAD/Windows/**'
- 'pcsx2/SPU2/Windows/**'
- 'pcsx2/USB/Win32/**'
- 'pcsx2/windows/**'
tags:
- v*
pull_request:
branches:
- master
paths-ignore:
- '**/*.md'
- '**/*.bat'
- '**/*.cmd'
- '**/*.props'
- '**/*.sln'
- '.clang-format'
- '.codacy.yaml'
- '.github/*'
- '.github/workflows/lint-gamedb.yml'
- '.github/workflows/macos-workflow.yml'
- '.github/workflows/pr-triage.yml'
- '.github/workflows/scripts/windows/**'
- '.github/workflows/scripts/validation/**'
- '.github/workflows/windows-workflow.yml'
- '.gitignore'
- 'bin/PCSX2_keys.ini.default'
- 'build.sh'
- 'buildbot.xml'
- 'pcsx2/CDVD/Windows/**'
- 'pcsx2/DEV9/Win32/**'
- 'pcsx2/PAD/Windows/**'
- 'pcsx2/SPU2/Windows/**'
- 'pcsx2/USB/Win32/**'
- 'pcsx2/windows/**'
- "**/*.md"
- "**/*.bat"
- "**/*.cmd"
- "**/*.props"
- "**/*.sln"
- ".clang-format"
- ".codacy.yaml"
- ".github/*"
- ".github/workflows/lint-gamedb.yml"
- ".github/workflows/macos-workflow.yml"
- ".github/workflows/pr-triage.yml"
- ".github/workflows/scripts/windows/**"
- ".github/workflows/scripts/validation/**"
- ".github/workflows/windows-workflow.yml"
- ".gitignore"
- "bin/PCSX2_keys.ini.default"
- "build.sh"
- "buildbot.xml"
- "pcsx2/CDVD/Windows/**"
- "pcsx2/DEV9/Win32/**"
- "pcsx2/PAD/Windows/**"
- "pcsx2/SPU2/Windows/**"
- "pcsx2/USB/Win32/**"
- "pcsx2/windows/**"
jobs:
build:
@ -86,18 +63,21 @@ jobs:
# (PCH conflicts with ccache, fixed by https://gitlab.kitware.com/cmake/cmake/-/merge_requests/4400)
cmakeflags: -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
detail: " nopch"
appimage: false
experimental: false
- os: ubuntu-18.04
platform: x86
compiler: gcc
cmakeflags: -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON
detail: " nopch"
appimage: false
experimental: false
- os: ubuntu-18.04
platform: x86
compiler: gcc
cmakeflags: -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON -DARCH_FLAG=-march=haswell
detail: " avx2 nopch"
appimage: false
experimental: false
name: ${{ matrix.platform }} | ${{ matrix.compiler }}${{ matrix.detail }}
@ -169,7 +149,8 @@ jobs:
TRIMMED_ARTIFACT_NAME=$(printf "%.199s]" "$ARTIFACT_NAME")
echo "name=$TRIMMED_ARTIFACT_NAME"
echo "##[set-output name=name;]${TRIMMED_ARTIFACT_NAME}"
echo "##[set-output name=arch;]${ARCH}"
- name: Install Packages
env:
PLATFORM: ${{ matrix.platform }}
@ -190,18 +171,37 @@ jobs:
- name: Run Tests
working-directory: ./build
run: ninja unittests
- name: Package AppImage
if: matrix.appimage == true
env:
PLATFORM: ${{ matrix.platform }}
COMPILER: ${{ matrix.compiler }}
name: ${{ steps.artifact-metadata.outputs.name }}
run: .github/workflows/scripts/linux/appimage.sh
if: ${{ matrix.appimage }}
- name: Upload artifact
if: matrix.appimage == true
uses: actions/upload-artifact@v2
with:
name: ${{ steps.artifact-metadata.outputs.name }}
path: artifacts
if: ${{ matrix.appimage }}
path: ci-artifacts
# ---- Release / Tagging related steps ----
- name: Prepare Build Artifacts
if: startsWith(github.ref, 'refs/tags/') && matrix.appimage == true
run: |
mv ./ci-artifacts/*.AppImage ./ci-artifacts/linux-AppImage-${{ steps.artifact-metadata.outputs.arch }}.AppImage
ls ./ci-artifacts/
- name: Upload Assets and Potential Publish Release
if: startsWith(github.ref, 'refs/tags/') && matrix.appimage == true
env:
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
ASSET_DIR: ${{ github.WORKSPACE }}/ci-artifacts
ASSET_EXTENSION: "AppImage"
TAG_TO_SEARCH_FOR: ${{ github.REF }}
run: |
cd ./.github/workflows/scripts/releases/upload-release-artifacts
npm ci
node index.js