Skip to content

Commit

Permalink
gh-actions: some workflow changes
Browse files Browse the repository at this point in the history
  • Loading branch information
luncliff committed Jan 26, 2025
1 parent 3287e76 commit 68feadd
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 63 deletions.
58 changes: 28 additions & 30 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jobs:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/triplets"
steps:
- uses: actions/[email protected]
- uses: ConorMacBride/[email protected]
with:
apt: nuget nasm libnuma-dev libopenmpi-dev libx11-dev libxi-dev libxext-dev libx11-xcb-dev

- name: "Run apt"
run: |
# sudo apt update -y
sudo apt install -y nuget nasm libnuma-dev libopenmpi-dev libx11-dev libxi-dev libxext-dev libx11-xcb-dev
- uses: aws-actions/configure-aws-credentials@v4
with:
Expand All @@ -42,40 +44,36 @@ jobs:
with:
key: "v2504-${{ runner.os }}-${{ matrix.vcpkg_tag }}"
path: |
${{ runner.temp }}/vcpkg-downloads
- name: "Create cache folders"
shell: bash
run: |
mkdir -p ${VCPKG_DOWNLOADS}
env:
VCPKG_DOWNLOADS: "${{ runner.temp }}/vcpkg-downloads"
${{ runner.temp }}/vcpkg-caches
- uses: lukka/[email protected]
name: "Run vcpkg(x64-linux)"
with:
vcpkgDirectory: "${{ runner.temp }}/vcpkg" # ignore VCPKG_INSTALLATION_ROOT
vcpkgGitCommitId: "${{ matrix.vcpkg_commit }}"
vcpkgJsonGlob: "test/vcpkg.json"
vcpkgConfigurationJsonGlob: "test/vcpkg-configuration.json"
runVcpkgInstall: true
runVcpkgFormatString: '[`install`, `--keep-going`, `--clean-buildtrees-after-build`, `--clean-packages-after-build`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `--x-feature`, `test`]'
runVcpkgInstall: false

- name: "Run vcpkg(x64-linux)"
run: |
mkdir -p ${VCPKG_DEFAULT_BINARY_CACHE}
vcpkg install --keep-going \
--clean-buildtrees-after-build \
--clean-packages-after-build \
--x-manifest-root test \
--x-feature test
env:
VCPKG_DEFAULT_BINARY_CACHE: "${{ runner.temp }}/vcpkg-caches"
VCPKG_DEFAULT_TRIPLET: "x64-linux"
VCPKG_BINARY_SOURCES: ${{ secrets.VCPKG_BINARY_SOURCES }}
VCPKG_DOWNLOADS: "${{ runner.temp }}/vcpkg-downloads"
VCPKG_BINARY_SOURCES: "${{ secrets.VCPKG_BINARY_SOURCES }}"

- uses: lukka/[email protected]
name: "Run vcpkg(arm64-linux)" # It's for future works. Not ready yet...
if: ${{ false }}
with:
vcpkgDirectory: "${{ runner.temp }}/vcpkg" # ignore VCPKG_INSTALLATION_ROOT
vcpkgGitCommitId: "${{ matrix.vcpkg_commit }}"
vcpkgJsonGlob: "test/vcpkg.json"
vcpkgConfigurationJsonGlob: "test/vcpkg-configuration.json"
runVcpkgInstall: true
runVcpkgFormatString: '[`install`, `--keep-going`, `--clean-buildtrees-after-build`, `--clean-packages-after-build`, `--triplet`, `$[env.VCPKG_DEFAULT_TRIPLET]`, `--x-feature`, `test`]'
- name: "Run vcpkg(arm64-linux)"
run: |
mkdir -p ${VCPKG_DEFAULT_BINARY_CACHE}
vcpkg install --keep-going \
--clean-buildtrees-after-build \
--clean-packages-after-build \
--x-manifest-root test \
--x-feature test
env:
VCPKG_DEFAULT_BINARY_CACHE: "${{ runner.temp }}/vcpkg-caches"
VCPKG_DEFAULT_TRIPLET: "arm64-linux"
VCPKG_BINARY_SOURCES: ${{ secrets.VCPKG_BINARY_SOURCES }}
VCPKG_DOWNLOADS: "${{ runner.temp }}/vcpkg-downloads"
VCPKG_BINARY_SOURCES: "${{ secrets.VCPKG_BINARY_SOURCES }}"
42 changes: 9 additions & 33 deletions .github/workflows/build-windows-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,6 @@ jobs:
with:
msbuild-architecture: x64

- uses: ConorMacBride/[email protected]
with:
choco: awscli

- name: "Update environment"
run: |
Write-Output "PATH=$env:PATH;C:\Program Files\Amazon\AWSCLIV2" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
New-Item -Type Directory -Force C:/vcpkg-caches
shell: pwsh

- name: "Enable LongPath"
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Expand All @@ -53,7 +43,9 @@ jobs:
continue-on-error: true

- name: "Change vcpkg.json"
run: Move-Item -Path "test/self-hosted.json" -Destination "test/vcpkg.json" -Force
run: |
New-Item -Type Directory -Force C:/vcpkg-caches
Move-Item -Path "test/self-hosted.json" -Destination "test/vcpkg.json" -Force
shell: pwsh

- uses: lukka/[email protected]
Expand Down Expand Up @@ -111,16 +103,6 @@ jobs:
with:
msbuild-architecture: x64

- uses: ConorMacBride/[email protected]
with:
choco: awscli

- name: "Update environment"
run: |
Write-Output "PATH=$env:PATH;C:\Program Files\Amazon\AWSCLIV2" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
New-Item -Type Directory -Force C:/vcpkg-caches
shell: pwsh

- name: "Enable LongPath"
run: |
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" -Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
Expand All @@ -129,7 +111,9 @@ jobs:
continue-on-error: true

- name: "Change vcpkg.json"
run: Move-Item -Path "test/self-hosted.json" -Destination "test/vcpkg.json" -Force
run: |
New-Item -Type Directory -Force C:/vcpkg-caches
Move-Item -Path "test/self-hosted.json" -Destination "test/vcpkg.json" -Force
shell: pwsh

- uses: lukka/[email protected]
Expand Down Expand Up @@ -172,16 +156,6 @@ jobs:
with:
msbuild-architecture: x64

- uses: ConorMacBride/[email protected]
with:
choco: awscli

- name: "Update environment"
run: |
Write-Output "PATH=$env:PATH;C:\Program Files\Amazon\AWSCLIV2" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
New-Item -Type Directory -Force C:/vcpkg-caches
shell: pwsh

- uses: humbletim/[email protected] # install Vulkan sdk if env.VULKAN_SDK is empty
if: env.VULKAN_SDK == ''
with:
Expand All @@ -197,7 +171,9 @@ jobs:
continue-on-error: true

- name: "Change vcpkg.json"
run: Move-Item -Path "test/self-hosted.json" -Destination "test/vcpkg.json" -Force
run: |
New-Item -Type Directory -Force C:/vcpkg-caches
Move-Item -Path "test/self-hosted.json" -Destination "test/vcpkg.json" -Force
shell: pwsh

- uses: lukka/[email protected]
Expand Down

0 comments on commit 68feadd

Please sign in to comment.