mirror of https://github.com/PCSX2/pcsx2.git
Build improvements
Remove unneeded quotation marks. linux-workflow.yml: Checkout Submodules: Shorten --jobs to -j, use $(getconf _NPROCESSORS_ONLN). Make restore-keys into one line. Remove unneeded ./. macos-workflow.yml: Checkout Submodules: Shorten --jobs to -j. Use $(getconf _NPROCESSORS_ONLN) instead of 2. Move HOMEBREW_NO_INSTALL_CLEANUP to env: and add HOMEBREW_NO_ANALYTICS. Remove unneeded ./. pr-triage.yml: Make on: pull_request_target into one line. Properly capitalize GitHub. compile.sh: Add warning when running outside of GitHub Actions CI. Use $(getconf _NPROCESSORS_ONLN). validate-vs-filters.ps1: End of file newline. windows-workflow.yml: Rename config to configuration. Opt out of PowerShell telemetry. Checkout Submodules: Shorten --jobs to -j, use $env:NUMBER_OF_PROCESSORS. Remove unneeded shell from Verify VS Project Files. setup-msbuild: Use v1. (always the latest version) Remove useless vs-version parameter. Remove unneeded ./ and .\. Add -p to mkdir. .gitmodules: Make submodules shallow. build.sh: Move parameters from shebang to set. Consistent formatting for ifs. Use $(getconf _NPROCESSORS_ONLN).
This commit is contained in:
parent
4995b13994
commit
8628993fb0
|
@ -5,12 +5,12 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- "**/GameIndex.yaml"
|
- '**/GameIndex.yaml'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths:
|
paths:
|
||||||
- "**/GameIndex.yaml"
|
- '**/GameIndex.yaml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
@ -21,7 +21,7 @@ jobs:
|
||||||
|
|
||||||
- name: Validate GameDB
|
- name: Validate GameDB
|
||||||
env:
|
env:
|
||||||
SCRIPT_DIR: "./.github/workflows/scripts/validation/lint-gamedb"
|
SCRIPT_DIR: .github/workflows/scripts/validation/lint-gamedb
|
||||||
run: |
|
run: |
|
||||||
pip install -r "${SCRIPT_DIR}/requirements.txt"
|
pip install -r "${SCRIPT_DIR}/requirements.txt"
|
||||||
python "${SCRIPT_DIR}/lint-gamedb.py"
|
python "${SCRIPT_DIR}/lint-gamedb.py"
|
||||||
|
|
|
@ -7,22 +7,58 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- '**/*.md'
|
||||||
- "**/*.md"
|
- '**/*.bat'
|
||||||
- .clang-format
|
- '**/*.cmd'
|
||||||
- debian-packager/
|
- '**/*.props'
|
||||||
- bin/PCSX2_keys.ini.default
|
- '**/*.sln'
|
||||||
- "pcsx2/PAD/Windows/**"
|
- '.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/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- '**/*.md'
|
||||||
- "**/*.md"
|
- '**/*.bat'
|
||||||
- .clang-format
|
- '**/*.cmd'
|
||||||
- debian-packager/
|
- '**/*.props'
|
||||||
- bin/PCSX2_keys.ini.default
|
- '**/*.sln'
|
||||||
- "pcsx2/PAD/Windows/**"
|
- '.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:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -82,7 +118,7 @@ jobs:
|
||||||
|
|
||||||
- name: Checkout Submodules
|
- name: Checkout Submodules
|
||||||
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
||||||
run: git submodule update --init --recursive --jobs 2
|
run: git submodule update --init --recursive -j $(getconf _NPROCESSORS_ONLN)
|
||||||
|
|
||||||
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
|
# -- SETUP CCACHE - https://cristianadam.eu/20200113/speeding-up-c-plus-plus-github-actions-using-ccache/
|
||||||
- name: Prepare ccache timestamp
|
- name: Prepare ccache timestamp
|
||||||
|
@ -139,7 +175,7 @@ jobs:
|
||||||
run: .github/workflows/scripts/linux/generate-cmake.sh
|
run: .github/workflows/scripts/linux/generate-cmake.sh
|
||||||
|
|
||||||
- name: Build PCSX2
|
- name: Build PCSX2
|
||||||
working-directory: ./build
|
working-directory: build
|
||||||
run: ../.github/workflows/scripts/linux/compile.sh
|
run: ../.github/workflows/scripts/linux/compile.sh
|
||||||
|
|
||||||
- name: Package AppImage
|
- name: Package AppImage
|
||||||
|
|
|
@ -7,22 +7,60 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- '**/*.md'
|
||||||
- "**/*.md"
|
- '**/*.bat'
|
||||||
- .clang-format
|
- '**/*.cmd'
|
||||||
- debian-packager/
|
- '**/*.props'
|
||||||
- bin/PCSX2_keys.ini.default
|
- '**/*.sln'
|
||||||
- "pcsx2/PAD/Windows/**"
|
- '.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'
|
||||||
|
- 'debian-packager/**'
|
||||||
|
- '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
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- '**/*.md'
|
||||||
- "**/*.md"
|
- '**/*.bat'
|
||||||
- .clang-format
|
- '**/*.cmd'
|
||||||
- debian-packager/
|
- '**/*.props'
|
||||||
- bin/PCSX2_keys.ini.default
|
- '**/*.sln'
|
||||||
- "pcsx2/PAD/Windows/**"
|
- '.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'
|
||||||
|
- 'debian-packager/**'
|
||||||
|
- 'pcsx2/CDVD/Windows/**'
|
||||||
|
- 'pcsx2/DEV9/Win32/**'
|
||||||
|
- 'pcsx2/PAD/Windows/**'
|
||||||
|
- 'pcsx2/SPU2/Windows/**'
|
||||||
|
- 'pcsx2/USB/Win32/**'
|
||||||
|
- 'pcsx2/windows/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
@ -53,13 +91,14 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Checkout Submodules
|
- name: Checkout Submodules
|
||||||
run: git submodule update --init --recursive --jobs 2
|
run: git submodule update --init --recursive -j $(getconf _NPROCESSORS_ONLN)
|
||||||
|
|
||||||
- name: Install Packages
|
- name: Install Packages
|
||||||
env:
|
env:
|
||||||
PLATFORM: ${{ matrix.platform }}
|
PLATFORM: ${{ matrix.platform }}
|
||||||
|
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||||
|
HOMEBREW_NO_ANALYTICS: 1
|
||||||
run: |
|
run: |
|
||||||
export HOMEBREW_NO_INSTALL_CLEANUP=1
|
|
||||||
brew update
|
brew update
|
||||||
brew install sound-touch portaudio wxmac gtk+3 sdl2 libsamplerate
|
brew install sound-touch portaudio wxmac gtk+3 sdl2 libsamplerate
|
||||||
brew install --cask xquartz # We use its OpenGL headers
|
brew install --cask xquartz # We use its OpenGL headers
|
||||||
|
@ -68,5 +107,5 @@ jobs:
|
||||||
run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_PO=FALSE -B build .
|
run: cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_PO=FALSE -B build .
|
||||||
|
|
||||||
- name: Build PCSX2
|
- name: Build PCSX2
|
||||||
working-directory: ./build
|
working-directory: build
|
||||||
run: make -j2 # macOS doesn't use make install
|
run: make -j$(getconf _NPROCESSORS_ONLN) # macOS doesn't use make install
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
# Runs steps to triage an incoming Pull Request, for example - applying labels.
|
# Runs steps to triage an incoming Pull Request, for example - applying labels.
|
||||||
name: 🤔 Pull Request Triage
|
name: 🤔 Pull Request Triage
|
||||||
|
|
||||||
on:
|
on: pull_request_target
|
||||||
pull_request_target:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
|
@ -12,18 +9,18 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/labeler@main
|
- uses: actions/labeler@main
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- uses: xTVaser/first-interaction@v1.2.4
|
- uses: xTVaser/first-interaction@v1.2.4
|
||||||
with:
|
with:
|
||||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
debug-mode: false
|
debug-mode: false
|
||||||
pr-message: |-
|
pr-message: |-
|
||||||
## Thank you for submitting a contribution to PCSX2
|
## Thank you for submitting a contribution to PCSX2
|
||||||
|
|
||||||
As this is your first pull request, [please be aware of the contributing guidelines](https://github.com/PCSX2/pcsx2/blob/master/.github/CONTRIBUTING.md).
|
As this is your first pull request, [please be aware of the contributing guidelines](https://github.com/PCSX2/pcsx2/blob/master/.github/CONTRIBUTING.md).
|
||||||
|
|
||||||
Additionally, as per recent changes in Github Actions, your pull request will need to be approved by a maintainer before Github Actions can run against it. [You can find more information about this change here.](https://github.blog/2021-04-22-github-actions-update-helping-maintainers-combat-bad-actors/)
|
Additionally, as per recent changes in GitHub Actions, your pull request will need to be approved by a maintainer before GitHub Actions can run against it. [You can find more information about this change here.](https://github.blog/2021-04-22-github-actions-update-helping-maintainers-combat-bad-actors/)
|
||||||
|
|
||||||
Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!
|
Please be patient until this happens. In the meantime if you'd like to confirm the builds are passing, you have the option of opening a PR on your own fork, just make sure your fork's master branch is up to date!
|
||||||
pr-labels: "First Time Contribution"
|
pr-labels: "First Time Contribution"
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
if [ -n "${GITHUB_ACTIONS}" ]; then
|
||||||
|
echo "Warning: Running this script outside of GitHub Actions isn't recommended."
|
||||||
|
fi
|
||||||
|
|
||||||
export CCACHE_BASEDIR=${GITHUB_WORKSPACE}
|
export CCACHE_BASEDIR=${GITHUB_WORKSPACE}
|
||||||
export CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache
|
export CCACHE_DIR=${GITHUB_WORKSPACE}/.ccache
|
||||||
export CCACHE_COMPRESS="true"
|
export CCACHE_COMPRESS="true"
|
||||||
|
|
|
@ -7,22 +7,54 @@ on:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- '**/*.md'
|
||||||
- "**/*.md"
|
- '.clang-format'
|
||||||
- .clang-format
|
- '.codacy.yaml'
|
||||||
- debian-packager/
|
- '.github/*'
|
||||||
- bin/PCSX2_keys.ini.default
|
- '.github/workflows/lint-gamedb.yml'
|
||||||
- "pcsx2/PAD/Linux/**"
|
- '.github/workflows/linux-workflow.yml'
|
||||||
|
- '.github/workflows/macos-workflow.yml'
|
||||||
|
- '.github/workflows/scripts/linux/**'
|
||||||
|
- '.github/workflows/scripts/validation/**'
|
||||||
|
- '.gitignore'
|
||||||
|
- 'bin/PCSX2_keys.ini.default'
|
||||||
|
- 'build.sh'
|
||||||
|
- 'buildbot.xml'
|
||||||
|
- 'debian-packager/**'
|
||||||
|
- 'linux_various/**'
|
||||||
|
- 'mscompile.cmd'
|
||||||
|
- 'pcsx2/CDVD/Linux/**'
|
||||||
|
- 'pcsx2/DEV9/Linux/**'
|
||||||
|
- 'pcsx2/Linux/**'
|
||||||
|
- 'pcsx2/PAD/Linux/**'
|
||||||
|
- 'pcsx2/SPU2/Linux/**'
|
||||||
|
- 'pcsx2/USB/linux/**'
|
||||||
pull_request:
|
pull_request:
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
paths-ignore:
|
paths-ignore:
|
||||||
- .gitignore
|
- '**/*.md'
|
||||||
- "**/*.md"
|
- '.clang-format'
|
||||||
- .clang-format
|
- '.codacy.yaml'
|
||||||
- debian-packager/
|
- '.github/*'
|
||||||
- bin/PCSX2_keys.ini.default
|
- '.github/workflows/lint-gamedb.yml'
|
||||||
- "pcsx2/PAD/Linux/**"
|
- '.github/workflows/linux-workflow.yml'
|
||||||
|
- '.github/workflows/macos-workflow.yml'
|
||||||
|
- '.github/workflows/scripts/linux/**'
|
||||||
|
- '.github/workflows/scripts/validation/**'
|
||||||
|
- '.gitignore'
|
||||||
|
- 'bin/PCSX2_keys.ini.default'
|
||||||
|
- 'build.sh'
|
||||||
|
- 'buildbot.xml'
|
||||||
|
- 'debian-packager/**'
|
||||||
|
- 'linux_various/**'
|
||||||
|
- 'mscompile.cmd'
|
||||||
|
- 'pcsx2/CDVD/Linux/**'
|
||||||
|
- 'pcsx2/DEV9/Linux/**'
|
||||||
|
- 'pcsx2/Linux/**'
|
||||||
|
- 'pcsx2/PAD/Linux/**'
|
||||||
|
- 'pcsx2/SPU2/Linux/**'
|
||||||
|
- 'pcsx2/USB/linux/**'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
retainDebugArtifacts:
|
retainDebugArtifacts:
|
||||||
|
@ -38,52 +70,50 @@ jobs:
|
||||||
matrix:
|
matrix:
|
||||||
os: [windows-2019]
|
os: [windows-2019]
|
||||||
platform: [Win32, x64]
|
platform: [Win32, x64]
|
||||||
config: [Release, Release AVX2]
|
configuration: [Release, Release AVX2]
|
||||||
experimental: [false]
|
experimental: [false]
|
||||||
|
|
||||||
name: "${{ matrix.platform }} | ${{ matrix.config }}"
|
name: ${{ matrix.platform }} | ${{ matrix.configuration }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
continue-on-error: ${{ matrix.experimental }}
|
continue-on-error: ${{ matrix.experimental }}
|
||||||
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
|
# Set some sort of timeout in the event of run-away builds. We are limited on concurrent jobs so, get rid of them.
|
||||||
timeout-minutes: 30
|
timeout-minutes: 30
|
||||||
|
|
||||||
|
env:
|
||||||
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# NOTE - useful for debugging
|
# NOTE - useful for debugging
|
||||||
# - name: Dump GitHub context
|
# - name: Dump GitHub context
|
||||||
# env:
|
# env:
|
||||||
# GITHUB_CONTEXT: ${{ toJson(github) }}
|
# GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
# run: |
|
# run: echo "$GITHUB_CONTEXT"
|
||||||
# echo "$GITHUB_CONTEXT"
|
|
||||||
|
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Checkout Submodules
|
- name: Checkout Submodules
|
||||||
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
if: steps.cache-submodules.outputs.cache-hit != 'true'
|
||||||
run: git submodule update --init --recursive --jobs 2
|
run: git submodule update --init --recursive -j $env:NUMBER_OF_PROCESSORS
|
||||||
|
|
||||||
- name: Verify VS Project Files
|
- name: Verify VS Project Files
|
||||||
shell: powershell
|
run: .github\workflows\scripts\windows\validate-vs-filters.ps1
|
||||||
run: .\.github\workflows\scripts\windows\validate-vs-filters.ps1
|
|
||||||
|
|
||||||
- name: Setup msbuild
|
- name: Setup msbuild
|
||||||
uses: microsoft/setup-msbuild@v1.0.2
|
uses: microsoft/setup-msbuild@v1
|
||||||
with:
|
|
||||||
vs-version: 16.7
|
|
||||||
|
|
||||||
- name: Build PCSX2
|
- name: Build PCSX2
|
||||||
env:
|
env:
|
||||||
# Set to 'true' to retain the .pdb / .exp / .lib, etc files which can be useful for repro'ing issues that only occur in the compiled .exe
|
# Set to 'true' to retain the .pdb / .exp / .lib, etc files which can be useful for repro'ing issues that only occur in the compiled .exe
|
||||||
RetainDebuggingArtifacts: ${{ github.event.inputs.retainDebugArtifacts == 'true' }}
|
RetainDebuggingArtifacts: ${{ github.event.inputs.retainDebugArtifacts == 'true' }}
|
||||||
run: msbuild "PCSX2_suite.sln" /m /v:m /p:Configuration="${{ matrix.config }}" /p:Platform="${{ matrix.platform }}"
|
run: msbuild "PCSX2_suite.sln" /m /v:m /p:Configuration="${{ matrix.configuration }}" /p:Platform="${{ matrix.platform }}"
|
||||||
|
|
||||||
- name: Prepare Artifact Metadata
|
- name: Prepare Artifact Metadata
|
||||||
id: artifact-metadata
|
id: artifact-metadata
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
ARCH=$([ "${{ matrix.platform }}" == Win32 ] && echo "32bit" || echo "64bit")
|
ARCH=$([ "${{ matrix.platform }}" == Win32 ] && echo "32bit" || echo "64bit")
|
||||||
SIMD=$([ "${{ matrix.config }}" == Release ] && echo "SSE4" || echo "AVX2")
|
SIMD=$([ "${{ matrix.configuration }}" == Release ] && echo "SSE4" || echo "AVX2")
|
||||||
ARTIFACT_NAME=""
|
|
||||||
if [ ${{ github.event_name }} == "pull_request" ]; then
|
if [ ${{ github.event_name }} == "pull_request" ]; then
|
||||||
PR_SHA=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
|
PR_SHA=$(git rev-parse --short "${{ github.event.pull_request.head.sha }}")
|
||||||
ARTIFACT_NAME="PCSX2-${ARCH}-${SIMD}"
|
ARTIFACT_NAME="PCSX2-${ARCH}-${SIMD}"
|
||||||
|
@ -106,7 +136,7 @@ jobs:
|
||||||
|
|
||||||
- name: Prepare Artifact Folder
|
- name: Prepare Artifact Folder
|
||||||
shell: bash
|
shell: bash
|
||||||
working-directory: ./bin
|
working-directory: bin
|
||||||
run: |
|
run: |
|
||||||
retainDebugArtifacts=$([ "${{ github.event.inputs.retainDebugArtifacts }}" == "true" ] && echo "true" || echo "false")
|
retainDebugArtifacts=$([ "${{ github.event.inputs.retainDebugArtifacts }}" == "true" ] && echo "true" || echo "false")
|
||||||
if [ "${retainDebugArtifacts}" == "false" ]; then
|
if [ "${retainDebugArtifacts}" == "false" ]; then
|
||||||
|
@ -114,7 +144,7 @@ jobs:
|
||||||
rm -f *.bsc *.exp *.ilk *.iobj *.ipdb *.lib *.pdb
|
rm -f *.bsc *.exp *.ilk *.iobj *.ipdb *.lib *.pdb
|
||||||
fi
|
fi
|
||||||
shopt -s extglob dotglob
|
shopt -s extglob dotglob
|
||||||
mkdir "${{ steps.artifact-metadata.outputs.name }}"
|
mkdir -p "${{ steps.artifact-metadata.outputs.name }}"
|
||||||
mv !("${{ steps.artifact-metadata.outputs.name }}") "${{ steps.artifact-metadata.outputs.name }}"
|
mv !("${{ steps.artifact-metadata.outputs.name }}") "${{ steps.artifact-metadata.outputs.name }}"
|
||||||
shopt -u dotglob
|
shopt -u dotglob
|
||||||
|
|
||||||
|
|
|
@ -1,15 +1,20 @@
|
||||||
[submodule "3rdparty/xz/xz"]
|
[submodule "3rdparty/xz/xz"]
|
||||||
path = 3rdparty/xz/xz
|
path = 3rdparty/xz/xz
|
||||||
url = https://github.com/PCSX2/xz.git
|
url = https://github.com/PCSX2/xz.git
|
||||||
|
shallow = true
|
||||||
[submodule "3rdparty/gtest"]
|
[submodule "3rdparty/gtest"]
|
||||||
path = 3rdparty/gtest
|
path = 3rdparty/gtest
|
||||||
url = https://github.com/google/googletest.git
|
url = https://github.com/google/googletest.git
|
||||||
|
shallow = true
|
||||||
[submodule "3rdparty/fmt/fmt"]
|
[submodule "3rdparty/fmt/fmt"]
|
||||||
path = 3rdparty/fmt/fmt
|
path = 3rdparty/fmt/fmt
|
||||||
url = https://github.com/fmtlib/fmt.git
|
url = https://github.com/fmtlib/fmt.git
|
||||||
|
shallow = true
|
||||||
[submodule "3rdparty/yaml-cpp/yaml-cpp"]
|
[submodule "3rdparty/yaml-cpp/yaml-cpp"]
|
||||||
path = 3rdparty/yaml-cpp/yaml-cpp
|
path = 3rdparty/yaml-cpp/yaml-cpp
|
||||||
url = https://github.com/jbeder/yaml-cpp.git
|
url = https://github.com/jbeder/yaml-cpp.git
|
||||||
|
shallow = true
|
||||||
[submodule "3rdparty/libchdr/libchdr"]
|
[submodule "3rdparty/libchdr/libchdr"]
|
||||||
path = 3rdparty/libchdr/libchdr
|
path = 3rdparty/libchdr/libchdr
|
||||||
url = https://github.com/rtissera/libchdr.git
|
url = https://github.com/rtissera/libchdr.git
|
||||||
|
shallow = true
|
||||||
|
|
35
build.sh
35
build.sh
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh -u
|
#!/bin/sh
|
||||||
|
|
||||||
# PCSX2 - PS2 Emulator for PCs
|
# PCSX2 - PS2 Emulator for PCs
|
||||||
# Copyright (C) 2002-2014 PCSX2 Dev Team
|
# Copyright (C) 2002-2014 PCSX2 Dev Team
|
||||||
|
@ -15,25 +15,22 @@
|
||||||
# If not, see <http://www.gnu.org/licenses/>.
|
# If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
#set -e # This terminates the script in case of any error
|
#set -e # This terminates the script in case of any error
|
||||||
|
set -u
|
||||||
|
|
||||||
# Function declarations
|
# Function declarations
|
||||||
set_ncpu_toolfile()
|
set_ncpu_toolfile()
|
||||||
{
|
{
|
||||||
|
ncpu=$(getconf _NPROCESSORS_ONLN)
|
||||||
if [ "$(uname -s)" = 'Darwin' ]; then
|
if [ "$(uname -s)" = 'Darwin' ]; then
|
||||||
ncpu="$(sysctl -n hw.ncpu)"
|
|
||||||
|
|
||||||
# Get the major Darwin/OSX version.
|
# Get the major Darwin/OSX version.
|
||||||
if [ "$(sysctl -n kern.osrelease | cut -d . -f 1)" -lt 13 ]; then
|
if [ "$(sysctl -n kern.osrelease | cut -d . -f 1)" -lt 13 ]; then
|
||||||
echo "This old OSX version is not supported! Build will fail."
|
echo "This old OSX version is not supported! Build will fail."
|
||||||
toolfile=cmake/darwin-compiler-i386-clang.cmake
|
toolfile=cmake/darwin-compiler-i386-clang.cmake
|
||||||
else
|
else
|
||||||
echo "Using Mavericks build with C++11 support."
|
echo "Using Mavericks build with C++11 support."
|
||||||
toolfile=cmake/darwin13-compiler-i386-clang.cmake
|
toolfile=cmake/darwin13-compiler-i386-clang.cmake
|
||||||
fi
|
fi
|
||||||
elif [ "$(uname -s)" = 'FreeBSD' ]; then
|
elif [ "$(uname -s)" != 'FreeBSD' ]; then
|
||||||
ncpu="$(sysctl -n hw.ncpu)"
|
|
||||||
else
|
|
||||||
ncpu=$(grep -w -c processor /proc/cpuinfo)
|
|
||||||
toolfile=cmake/linux-compiler-i386-multilib.cmake
|
toolfile=cmake/linux-compiler-i386-multilib.cmake
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
@ -73,17 +70,17 @@ set_compiler()
|
||||||
{
|
{
|
||||||
if [ "$useClang" -eq 1 ]; then
|
if [ "$useClang" -eq 1 ]; then
|
||||||
if [ "$useCross" -eq 0 ]; then
|
if [ "$useCross" -eq 0 ]; then
|
||||||
CC=clang CXX=clang++ cmake $flags "$root" 2>&1 | tee -a "$log"
|
CC=clang CXX=clang++ cmake $flags "$root" 2>&1 | tee -a "$log"
|
||||||
else
|
else
|
||||||
CC="clang -m32" CXX="clang++ -m32" cmake $flags "$root" 2>&1 | tee -a "$log"
|
CC="clang -m32" CXX="clang++ -m32" cmake $flags "$root" 2>&1 | tee -a "$log"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [ "$useIcc" -eq 1 ]; then
|
if [ "$useIcc" -eq 1 ]; then
|
||||||
if [ "$useCross" -eq 0 ]; then
|
if [ "$useCross" -eq 0 ]; then
|
||||||
CC="icc" CXX="icpc" cmake $flags "$root" 2>&1 | tee -a "$log"
|
CC="icc" CXX="icpc" cmake $flags "$root" 2>&1 | tee -a "$log"
|
||||||
else
|
else
|
||||||
CC="icc -m32" CXX="icpc -m32" cmake $flags "$root" 2>&1 | tee -a "$log"
|
CC="icc -m32" CXX="icpc -m32" cmake $flags "$root" 2>&1 | tee -a "$log"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Default compiler AKA GCC
|
# Default compiler AKA GCC
|
||||||
cmake $flags "$root" 2>&1 | tee -a "$log"
|
cmake $flags "$root" 2>&1 | tee -a "$log"
|
||||||
|
@ -113,7 +110,7 @@ run_cppcheck()
|
||||||
log=cpp_check__${flat_d}.log
|
log=cpp_check__${flat_d}.log
|
||||||
rm -f "$log"
|
rm -f "$log"
|
||||||
|
|
||||||
cppcheck $check -j $ncpu --platform=unix32 $define "$root/$d" 2>&1 | tee "$log"
|
cppcheck $check -j "$ncpu" --platform=unix32 "$define" "$root/$d" 2>&1 | tee "$log"
|
||||||
# Create a small summary (warning it might miss some issues)
|
# Create a small summary (warning it might miss some issues)
|
||||||
fgrep -e "(warning)" -e "(error)" -e "(style)" -e "(performance)" -e "(portability)" "$log" >> $summary
|
fgrep -e "(warning)" -e "(error)" -e "(style)" -e "(performance)" -e "(portability)" "$log" >> $summary
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue