mirror of https://github.com/OpenTTD/OpenTTD
Merge b0fab1558a
into a8650c6b06
commit
aa472fe3e9
|
@ -0,0 +1,50 @@
|
|||
name: 'Setup vcpkg'
|
||||
description: 'Installs vcpkg and initialises binary caching via NuGet'
|
||||
inputs:
|
||||
vcpkg-location:
|
||||
description: 'Where to install vcpkg'
|
||||
required: true
|
||||
mono-install-command:
|
||||
description: 'Command to run to install mono'
|
||||
required: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Install vcpkg
|
||||
shell: bash
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg "${{ inputs.vcpkg-location }}"
|
||||
cd "${{ inputs.vcpkg-location }}"
|
||||
./bootstrap-vcpkg.$(if [ "${{ runner.os }}" = "Windows" ]; then echo "bat"; else echo "sh"; fi) -disableMetrics
|
||||
|
||||
- name: Install mono
|
||||
if: inputs.mono-install-command
|
||||
shell: bash
|
||||
run: |
|
||||
${{ inputs.mono-install-command }}
|
||||
echo "MONO=mono" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Setup NuGet Credentials
|
||||
shell: bash
|
||||
env:
|
||||
FEED_URL: 'https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json'
|
||||
run: |
|
||||
cd "${{ inputs.vcpkg-location }}"
|
||||
${{ env.MONO }} $(./vcpkg fetch nuget | tail -n 1) \
|
||||
sources add \
|
||||
-source "${{ env.FEED_URL }}" \
|
||||
-storepasswordincleartext \
|
||||
-name "GitHub" \
|
||||
-username "${{ github.repository_owner }}" \
|
||||
-password "${{ github.token }}"
|
||||
${{ env.MONO }} $(./vcpkg fetch nuget | tail -n 1) \
|
||||
setapikey "${{ github.token }}" \
|
||||
-source "${{ env.FEED_URL }}"
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;nuget,GitHub,readwrite')
|
||||
|
|
@ -32,18 +32,11 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/setup-vcpkg
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
vcpkg-location: ${{ runner.temp }}/vcpkg
|
||||
mono-install-command: 'sudo apt-get install -y --no-install-recommends mono-complete'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
|
|
@ -34,18 +34,11 @@ jobs:
|
|||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/setup-vcpkg
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
vcpkg-location: ${{ runner.temp }}/vcpkg
|
||||
mono-install-command: 'brew install mono'
|
||||
|
||||
- name: Install OpenGFX
|
||||
run: |
|
||||
|
|
|
@ -15,23 +15,17 @@ jobs:
|
|||
name: CI
|
||||
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/setup-vcpkg
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}\vcpkg
|
||||
${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat -disableMetrics
|
||||
vcpkg-location: ${{ runner.temp }}/vcpkg
|
||||
|
||||
- name: Install OpenGFX
|
||||
shell: bash
|
||||
|
|
|
@ -21,23 +21,17 @@ jobs:
|
|||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/setup-vcpkg
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
vcpkg-location: ${{ runner.temp }}/vcpkg
|
||||
mono-install-command: 'sudo apt-get install -y --no-install-recommends mono-complete'
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
|
|
|
@ -35,14 +35,6 @@ jobs:
|
|||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
echo "::group::Install system dependencies"
|
||||
|
@ -113,20 +105,16 @@ jobs:
|
|||
# EOF
|
||||
echo "::endgroup::"
|
||||
|
||||
# We use vcpkg for our dependencies, to get more up-to-date version.
|
||||
echo "::group::Install vcpkg and dependencies"
|
||||
|
||||
git clone https://github.com/microsoft/vcpkg /vcpkg
|
||||
|
||||
(
|
||||
cd /vcpkg
|
||||
./bootstrap-vcpkg.sh -disableMetrics
|
||||
)
|
||||
|
||||
echo "::group::Install breakpad dependencies"
|
||||
cargo install --locked dump_syms
|
||||
echo "::endgroup::"
|
||||
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/setup-vcpkg
|
||||
with:
|
||||
vcpkg-location: /vcpkg
|
||||
mono-install-command: 'yum install -y mono-complete'
|
||||
|
||||
- name: Install GCC problem matcher
|
||||
uses: ammaraskar/gcc-problem-matcher@master
|
||||
|
||||
|
|
|
@ -37,18 +37,11 @@ jobs:
|
|||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/setup-vcpkg
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}/vcpkg
|
||||
${{ runner.temp }}/vcpkg/bootstrap-vcpkg.sh -disableMetrics
|
||||
vcpkg-location: ${{ runner.temp }}/vcpkg
|
||||
mono-install-command: 'brew install mono'
|
||||
|
||||
- name: Install dependencies
|
||||
env:
|
||||
|
|
|
@ -45,18 +45,10 @@ jobs:
|
|||
- name: Enable Rust cache
|
||||
uses: Swatinem/rust-cache@v2
|
||||
|
||||
- name: Setup vcpkg caching
|
||||
uses: actions/github-script@v7
|
||||
- name: Setup vcpkg
|
||||
uses: ./.github/actions/setup-vcpkg
|
||||
with:
|
||||
script: |
|
||||
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
|
||||
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
||||
core.exportVariable('VCPKG_BINARY_SOURCES', 'clear;x-gha,readwrite')
|
||||
|
||||
- name: Install vcpkg
|
||||
run: |
|
||||
git clone https://github.com/microsoft/vcpkg ${{ runner.temp }}\vcpkg
|
||||
${{ runner.temp }}\vcpkg\bootstrap-vcpkg.bat -disableMetrics
|
||||
vcpkg-location: ${{ runner.temp }}/vcpkg
|
||||
|
||||
- name: Install dependencies
|
||||
shell: bash
|
||||
|
|
Loading…
Reference in New Issue