Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 17 additions & 36 deletions .github/workflows/vcpkg_ci_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ on:
- 'docker/**'
- '.github/**'
- '**.md'
- 'old/**'
- '!.github/workflows/vcpkg_ci_linux.yml'
push:
paths-ignore:
- 'docker/**'
- '.github/**'
- '**.md'
- 'old/**'
- '!.github/workflows/vcpkg_ci_linux.yml'
tags-ignore:
- 'v*'
Expand Down Expand Up @@ -57,7 +55,7 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

env:
ARTIFACT_NAME: vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_${{ matrix.llvm }}_${{ matrix.host.arch }}.tar.xz
ARTIFACT_NAME: vcpkg_${{ matrix.image.name }}-${{ matrix.image.tag }}_${{ matrix.llvm }}_${{ matrix.host.arch }}
VCPKG_DEFAULT_HOST_TRIPLET: ${{ matrix.host.triplet }}

steps:
Expand All @@ -76,29 +74,19 @@ jobs:
with:
submodules: recursive

- name: Read vcpkg Info
id: vcpkg_info
shell: bash
run: |
{ read -r vcpkg_repo_url && read -r vcpkg_commit; } <./vcpkg_info.txt || exit 1
echo ::set-output name=repo_url::${vcpkg_repo_url}
echo ::set-output name=commit::${vcpkg_commit}

- name: Clear prior vcpkg directory
run: |
rm -rf "${{ github.workspace }}/vcpkg"

# Needed for caching the actual vcpkg executable
- name: 'Restore from cache and install vcpkg'
uses: lukka/run-vcpkg@v10.1
with:
vcpkgGitURL: ${{ steps.vcpkg_info.outputs.repo_url }}
vcpkgGitCommitId: ${{ steps.vcpkg_info.outputs.commit }}
appendedCacheKey: '${{ matrix.host.arch }}-${{ matrix.image.name }}-${{ matrix.image.tag }}-${{ matrix.host.arch }}-${{ matrix.llvm }}-clear'
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
setupOnly: true
- name: Initialize vcpkg
shell: bash
run: |
{ read -r vcpkg_repo_url && read -r vcpkg_commit; } <./vcpkg_info.txt || exit 1
git clone "${vcpkg_repo_url}"
git -C vcpkg checkout "${vcpkg_commit}"
./vcpkg/bootstrap-vcpkg.sh
echo "VCPKG_ROOT=$(pwd)/vcpkg" >> $GITHUB_ENV

# Omit this step if using manifests
- name: 'vcpkg install dependencies'
shell: 'bash'
run: |
Expand Down Expand Up @@ -126,30 +114,23 @@ jobs:
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
"${{ secrets.GITHUB_TOKEN }}"

${VCPKG_ROOT}/vcpkg install \
--triplet "${{ matrix.host.triplet }}" \
--clean-after-build \
--debug \
${{ matrix.llvm }} \
@overlays.txt \
@dependencies.txt
./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build

echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV

- name: 'Export Packages'
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
shell: 'bash'
run: |
apt-get update
apt-get install -y pixz
if [ ${{ matrix.host.arch }} == "arm64" ] ; then
export VCPKG_FORCE_SYSTEM_BINARIES=1
fi
./emit_artifacts.sh ${{ env.ARTIFACT_NAME }}
tar --use-compress-program pixz -cf "${{ env.ARTIFACT_NAME }}.tar.xz" ./${{ env.ARTIFACT_NAME }}

- uses: actions/upload-artifact@v3
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}.tar.xz
path: ${{ env.ARTIFACT_NAME }}.tar.xz

- name: Prepare ccache
id: ccache_prep
Expand Down Expand Up @@ -238,12 +219,12 @@ jobs:
github.event.release
uses: softprops/action-gh-release@v1
with:
files: ${{ env.ARTIFACT_NAME }}
files: ${{ env.ARTIFACT_NAME }}.tar.xz
prerelease: ${{ contains(github.ref, 'pre') || contains(github.ref, 'rc') }}
token: ${{ secrets.RELEASE_TOKEN }}

- name: Cache cleanup and reporting
shell: 'bash'
run: |
rm -rf ${VCPKG_ROOT}/{buildtrees,installed,packages}
rm -rf vcpkg/{buildtrees,installed,packages}
ccache --show-stats
46 changes: 17 additions & 29 deletions .github/workflows/vcpkg_ci_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,12 @@ on:
- 'docker/**'
- '.github/**'
- '**.md'
- 'old/**'
- '!.github/workflows/vcpkg_ci_mac.yml'
push:
paths-ignore:
- 'docker/**'
- '.github/**'
- '**.md'
- 'old/**'
- '!.github/workflows/vcpkg_ci_mac.yml'
tags-ignore:
- 'v*'
Expand All @@ -44,7 +42,7 @@ jobs:
runs-on: ${{ matrix.os.runner }}

env:
ARTIFACT_NAME: vcpkg_${{ matrix.os.runner }}_${{ matrix.llvm }}_xcode-${{ matrix.os.xcode }}_amd64.tar.xz
ARTIFACT_NAME: vcpkg_${{ matrix.os.runner }}_${{ matrix.llvm }}_xcode-${{ matrix.os.xcode }}_amd64

steps:
# Used to get commit message since PRs are on a merge commit
Expand Down Expand Up @@ -75,52 +73,42 @@ jobs:
echo "Selecting XCode Version ${{ matrix.os.xcode }}"
sudo xcode-select -s /Applications/Xcode_${{ matrix.os.xcode }}.app/Contents/Developer

- name: Read vcpkg Info
id: vcpkg_info
- name: Initialize vcpkg
shell: bash
run: |
{ read -r vcpkg_repo_url && read -r vcpkg_commit; } <./vcpkg_info.txt || exit 1
echo ::set-output name=repo_url::${vcpkg_repo_url}
echo ::set-output name=commit::${vcpkg_commit}
git clone "${vcpkg_repo_url}"
git -C vcpkg checkout "${vcpkg_commit}"
./vcpkg/bootstrap-vcpkg.sh
echo "VCPKG_ROOT=$(pwd)/vcpkg" >> $GITHUB_ENV

# Needed for caching the actual vcpkg executable
- name: 'Restore from cache and install vcpkg'
uses: lukka/run-vcpkg@v10.1
with:
vcpkgGitURL: ${{ steps.vcpkg_info.outputs.repo_url }}
vcpkgGitCommitId: ${{ steps.vcpkg_info.outputs.commit }}
appendedCacheKey: '${{ matrix.os.runner }}-${{ matrix.os.xcode }}-${{ matrix.llvm }}-clear'
setupOnly: true

# Omit this step if using manifests
- name: 'vcpkg install dependencies'
shell: 'bash'
run: |
export VCPKG_DISABLE_METRICS=1
brew install bash ninja

# Setup NuGet authentication
mono "$(${VCPKG_ROOT}/vcpkg fetch nuget | tail -n 1)" setapikey \
-source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \
"${{ secrets.GITHUB_TOKEN }}"

${VCPKG_ROOT}/vcpkg install \
--triplet "${TRIPLET}" \
--clean-after-build \
--debug \
${{ matrix.llvm }} \
@overlays.txt \
@dependencies.txt
./build_dependencies.sh --release --export-dir ./${{ env.ARTIFACT_NAME }} ${{ matrix.llvm }} --clean-after-build

echo "VCPKG_ROOT=$(pwd)/${{ env.ARTIFACT_NAME }}" >> $GITHUB_ENV

- name: 'Export Packages'
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
shell: 'bash'
run: |
brew install pixz
./emit_artifacts.sh ${{ env.ARTIFACT_NAME }}
tar --use-compress-program pixz -cf "${{ env.ARTIFACT_NAME }}.tar.xz" ./${{ env.ARTIFACT_NAME }}

- uses: actions/upload-artifact@v3
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
with:
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.ARTIFACT_NAME }}
name: ${{ env.ARTIFACT_NAME }}.tar.xz
path: ${{ env.ARTIFACT_NAME }}.tar.xz

- name: 'Install build dependencies'
shell: 'bash'
Expand Down Expand Up @@ -206,12 +194,12 @@ jobs:
github.event.release
uses: softprops/action-gh-release@v1
with:
files: ${{ env.ARTIFACT_NAME }}
files: ${{ env.ARTIFACT_NAME }}.tar.xz
prerelease: ${{ contains(github.ref, 'pre') || contains(github.ref, 'rc') }}
token: ${{ secrets.RELEASE_TOKEN }}

- name: Cache cleanup and reporting
shell: 'bash'
run: |
rm -rf ${VCPKG_ROOT}/{buildtrees,installed,packages}
rm -rf vcpkg/{buildtrees,installed,packages}
ccache --show-stats
Loading