mirror of https://github.com/PCSX2/pcsx2.git
CI: Enable macOS artifacts
This commit is contained in:
parent
3d76652b5f
commit
3983e542b2
|
@ -6,31 +6,8 @@ on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
tags:
|
||||||
- '**/*.md'
|
- v*
|
||||||
- '**/*.bat'
|
|
||||||
- '**/*.cmd'
|
|
||||||
- '**/*.props'
|
|
||||||
- '**/*.sln'
|
|
||||||
- '.clang-format'
|
|
||||||
- '.codacy.yaml'
|
|
||||||
- '.github/*'
|
|
||||||
- '.github/workflows/lint-gamedb.yml'
|
|
||||||
- '.github/workflows/linux-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/**'
|
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
@ -119,3 +96,51 @@ jobs:
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
working-directory: build
|
working-directory: build
|
||||||
run: make -j$(getconf _NPROCESSORS_ONLN) unittests
|
run: make -j$(getconf _NPROCESSORS_ONLN) unittests
|
||||||
|
|
||||||
|
- name: Prepare Artifact Metadata
|
||||||
|
id: artifact-metadata
|
||||||
|
run: |
|
||||||
|
if [ ${{ github.event_name }} == "pull_request" ]; then
|
||||||
|
PR_SHA=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
|
||||||
|
ARTIFACT_NAME="PCSX2"
|
||||||
|
if [ -n "${{ github.event.pull_request.number }}" ]; then
|
||||||
|
PR_NUM=${{ github.event.pull_request.number }}
|
||||||
|
ARTIFACT_NAME="${ARTIFACT_NAME}-pr[${PR_NUM}]"
|
||||||
|
fi
|
||||||
|
ARTIFACT_NAME="${ARTIFACT_NAME}-sha[${PR_SHA}]"
|
||||||
|
if [ -n "${{ github.event.pull_request.title }}" ]; then
|
||||||
|
PR_TITLE=$(echo "${{ github.event.pull_request.title }}" | tr -cd '[a-zA-Z0-9[:space:]]_-')
|
||||||
|
ARTIFACT_NAME="${ARTIFACT_NAME}-title[${PR_TITLE}"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
SHA=$(git rev-parse --short "$GITHUB_SHA")
|
||||||
|
ARTIFACT_NAME="PCSX2-sha[${SHA}"
|
||||||
|
fi
|
||||||
|
TRIMMED_ARTIFACT_NAME=$(printf "%.199s]" "$ARTIFACT_NAME")
|
||||||
|
echo "name=$TRIMMED_ARTIFACT_NAME"
|
||||||
|
echo "##[set-output name=name;]${TRIMMED_ARTIFACT_NAME}"
|
||||||
|
|
||||||
|
- name: Prepare Build Artifacts
|
||||||
|
run: |
|
||||||
|
mv build/pcsx2/PCSX2.app "${{ steps.artifact-metadata.outputs.name }}.app"
|
||||||
|
tar cvzf "${{ steps.artifact-metadata.outputs.name }}.tar.gz" "${{ steps.artifact-metadata.outputs.name }}.app"
|
||||||
|
mkdir ci-artifacts
|
||||||
|
cp "${{ steps.artifact-metadata.outputs.name }}.tar.gz" ci-artifacts/macOS.tar.gz
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v3
|
||||||
|
with:
|
||||||
|
name: ${{ steps.artifact-metadata.outputs.name }}
|
||||||
|
path: "*.tar.gz"
|
||||||
|
|
||||||
|
- name: Upload Assets and Potential Publish Release
|
||||||
|
if: github.repository == 'PCSX2/pcsx2' && startsWith(github.ref, 'refs/tags/')
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.BOT_PAT }}
|
||||||
|
ASSET_DIR: ${{ github.WORKSPACE }}/ci-artifacts
|
||||||
|
ASSET_EXTENSION: tar.gz
|
||||||
|
TAG_TO_SEARCH_FOR: ${{ github.REF }}
|
||||||
|
run: |
|
||||||
|
cd .github/workflows/scripts/releases/upload-release-artifacts
|
||||||
|
npm ci
|
||||||
|
node index.js
|
||||||
|
|
|
@ -113,7 +113,8 @@ const { data: releaseAssetsPost } = await octokit.rest.repos.listReleaseAssets({
|
||||||
let expectedAssets = {
|
let expectedAssets = {
|
||||||
"windows-64bit-sse4": false,
|
"windows-64bit-sse4": false,
|
||||||
"windows-64bit-avx2": false,
|
"windows-64bit-avx2": false,
|
||||||
"linux-appimage-64bit": false
|
"linux-appimage-64bit": false,
|
||||||
|
"macos": false,
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < releaseAssetsPost.length; i++) {
|
for (var i = 0; i < releaseAssetsPost.length; i++) {
|
||||||
|
|
Loading…
Reference in New Issue