Skip to content

Commit

Permalink
bash
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Feb 12, 2024
1 parent 7096132 commit 0fc9e7d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 15 deletions.
16 changes: 9 additions & 7 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,21 +46,23 @@ jobs:
fetch-depth: 1

- name: 🐾 Bootstrap vcpkg
shell: powershell
shell: bash
run: |
PKG_SOURCE_USER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
./vcpkg/bootstrap-vcpkg.sh
.$(./vcpkg/vcpkg fetch nuget) sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText
.$(./vcpkg/vcpkg fetch nuget) setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json"
NUGET_EXE=$(./vcpkg/vcpkg fetch nuget | grep '^\/.*nuget.exe$')
echo "Downloaded $NUGET_EXE"
mono $NUGET_EXE sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText
mono $NUGET_EXE setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json"
echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $GITHUB_ENV
echo "PATH=$env:VCPKG_ROOT;$env:PATH" >> $GITHUB_ENV
echo "VCPKG_ROOT=$env:VCPKG_ROOT" >> $GITHUB_ENV
echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV
echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV
- name: 🌋 Build
run: |
VCPKG_OPTIONS="--overlay-ports="${{ github.workspace }}/ports" --triplet=${{ matrix.triplet }} --x-buildtrees-root=${{ env.buildtrees }}"
./vcpkg/vcpkg.exe install $VCPKG_OPTIONS py-pip
./vcpkg/vcpkg.exe install $VCPKG_OPTIONS py-sip
./vcpkg/vcpkg install $VCPKG_OPTIONS py-pip
./vcpkg/vcpkg install $VCPKG_OPTIONS py-sip
- name: 📑 Upload logs
uses: actions/upload-artifact@v4
Expand Down
18 changes: 10 additions & 8 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,17 @@ jobs:
fetch-depth: 1

- name: 🐾 Bootstrap vcpkg
shell: powershell
shell: bash
run: |
$PKG_SOURCE_USER = $env:GITHUB_REPOSITORY -split '/' | Select-Object -First 1
.\vcpkg\bootstrap-vcpkg.bat
.$(.\vcpkg\vcpkg.exe fetch nuget) sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText
.$(.\vcpkg\vcpkg.exe fetch nuget) setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json"
echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $env:GITHUB_ENV
echo "PATH=$env:VCPKG_ROOT;$env:PATH" >> $env:GITHUB_ENV
echo "VCPKG_ROOT=$env:VCPKG_ROOT" >> $env:GITHUB_ENV
PKG_SOURCE_USER=$(echo $GITHUB_REPOSITORY | cut -d '/' -f 1)
./vcpkg/bootstrap-vcpkg.sh
NUGET_EXE=$(./vcpkg/vcpkg fetch nuget)
echo "Downloaded $NUGET_EXE"
$NUGET_EXE sources add -Name ghpkg -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json" -UserName "$PKG_SOURCE_USER" -Password "${{ secrets.GITHUB_TOKEN }}" -StorePasswordInClearText
$NUGET_EXE setapikey "${{ secrets.GITHUB_TOKEN }}" -Source "https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json"
echo "VCPKG_BINARY_SOURCES=clear;nuget,https://nuget.pkg.github.com/$PKG_SOURCE_USER/index.json,readwrite" >> $GITHUB_ENV
echo "PATH=$VCPKG_ROOT;$PATH" >> $GITHUB_ENV
echo "VCPKG_ROOT=$VCPKG_ROOT" >> $GITHUB_ENV
- name: 🌋 Build
run: |
Expand Down

0 comments on commit 0fc9e7d

Please sign in to comment.