Skip to content

Commit

Permalink
GA: upgrade actions/upload-artifact from v3 to v4
Browse files Browse the repository at this point in the history
  • Loading branch information
pablode committed Feb 9, 2025
1 parent 74e5155 commit becd5ca
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 46 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/build-usd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,9 @@ on:
required: false
type: boolean
default: true

outputs:
archive-name:
description: "Name of the archive containing the build artifacts."
value: build-${{ inputs.build-config }}-${{ github.sha }}
archive-name-suffix:
required: false
type: string

jobs:
build:
Expand All @@ -33,19 +31,19 @@ jobs:
image: ubuntu-20.04
usd-download-url: "https://github.com/pablode/USD/releases/download/v${{ inputs.usd-version }}-ci-release/USD${{ inputs.usd-version }}_Linux_x64.tar.gz"
usd-install-path: /home/runner/work/USD/USD/INSTALL
archive-file-name: guc_USD${{ inputs.usd-version }}_Linux_x64.tar.gz
archive-name: guc_USD${{ inputs.usd-version }}_Linux_x64

- os-family: MacOS
image: macos-14
usd-download-url: "https://github.com/pablode/USD/releases/download/v${{ inputs.usd-version }}-ci-release/USD${{ inputs.usd-version }}_MacOS_ARM.tar.gz"
usd-install-path: /Users/runner/work/USD/USD/INSTALL
archive-file-name: guc_USD${{ inputs.usd-version }}_MacOS_ARM.tar.gz
archive-name: guc_USD${{ inputs.usd-version }}_MacOS_ARM

- os-family: Windows
image: windows-2019
usd-download-url: "https://github.com/pablode/USD/releases/download/v${{ inputs.usd-version }}-ci-release/USD${{ inputs.usd-version }}_Windows_x64.tar.gz"
usd-install-path: C:/INSTALL
archive-file-name: guc_USD${{ inputs.usd-version }}_Windows_x64.tar.gz
archive-name: guc_USD${{ inputs.usd-version }}_Windows_x64

uses: ./.github/workflows/build.yml
with:
Expand All @@ -54,6 +52,5 @@ jobs:
usd-download-url: ${{ matrix.usd-download-url }}
usd-install-path: ${{ matrix.usd-install-path }}
upload-archive: ${{ inputs.upload-archive }}
archive-name: build-${{ inputs.build-config }}-${{ github.sha }}
archive-file-name: ${{ matrix.archive-file-name }}
archive-name: ${{ matrix.archive-name }}${{ inputs.archive-name-suffix }}
extra-cmake-flags: ${{ inputs.extra-cmake-flags }}
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ on:
archive-name:
required: true
type: string
archive-file-name:
required: true
type: string
extra-cmake-flags:
required: false
type: string
Expand Down Expand Up @@ -71,12 +68,12 @@ jobs:
- name: Create archive
if: ${{ inputs.upload-archive }}
working-directory: INSTALL
run: tar -zcvf ${{ inputs.archive-file-name }} *
run: tar -zcvf ${{ inputs.archive-name }}.tar.gz *

- name: Upload archive
if: ${{ inputs.upload-archive }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.archive-name }}
path: INSTALL/${{ inputs.archive-file-name }}
path: INSTALL/${{ inputs.archive-name }}.tar.gz
retention-days: 1
26 changes: 3 additions & 23 deletions .github/workflows/deploy-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,10 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Download USD v25.02 artifacts
uses: actions/download-artifact@v3
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: ${{ needs.build-2502.outputs.archive-name }}

- name: Download USD v24.11 artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.build-2411.outputs.archive-name }}

- name: Download USD v24.08 artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.build-2408.outputs.archive-name }}

- name: Download USD v24.05 artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.build-2405.outputs.archive-name }}

- name: Download USD v24.03 artifacts
uses: actions/download-artifact@v3
with:
name: ${{ needs.build-2403.outputs.archive-name }}
merge-multiple: true

- name: Deploy draft release
uses: softprops/action-gh-release@d4e8205d7e959a9107da6396278b2f1f07af0f9b
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
usd-version: ${{ inputs.usd-version }}
build-config: Debug
extra-cmake-flags: -DCMAKE_COMPILE_WARNING_AS_ERROR=ON -DCMAKE_DISABLE_FIND_PACKAGE_OpenImageIO=1
archive-name-suffix: _debug

build-debug-oiio:
name: Build guc for USD v${{ inputs.usd-version }} (Debug, OpenImageIO)
Expand Down Expand Up @@ -84,12 +85,12 @@ jobs:

- name: Download guc artifacts
id: download-guc
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ needs.build-release.outputs.archive-name }}
merge-multiple: true

- name: Install guc
run: mkdir -p GUC_INSTALL && tar -xvf ${{ matrix.artifact-name}} -C $PWD/GUC_INSTALL
run: mkdir -p GUC_INSTALL && tar -xvf ${{ matrix.artifact-name }} -C $PWD/GUC_INSTALL

- name: Set up environment variables (Linux)
if: matrix.os-family == 'Linux'
Expand Down Expand Up @@ -128,7 +129,7 @@ jobs:

env:
USD_DOWNLOAD_URL: "https://github.com/pablode/USD/releases/download/v${{ inputs.usd-version }}-ci-release/USD${{ inputs.usd-version }}_Linux_x64_Python3.9.tar.gz"
GUC_ARTIFACT_NAME: guc_USD${{ inputs.usd-version }}_Linux_x64.tar.gz
GUC_ARTIFACT_NAME: guc_USD${{ inputs.usd-version }}_Linux_x64_debug.tar.gz
USD_INSTALL_PATH: /home/runner/work/USD/USD/INSTALL

steps:
Expand All @@ -140,9 +141,9 @@ jobs:

- name: Download guc artifacts
id: download-guc
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ needs.build-debug.outputs.archive-name }}
merge-multiple: true

# Install guc to the USD installation so that we can use the usdGlTF Sdf plugin
- name: Install guc
Expand Down Expand Up @@ -216,7 +217,7 @@ jobs:

- name: Upload archive
if: success() || failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
path: test-output.tar.gz
if-no-files-found: error
Expand Down

0 comments on commit becd5ca

Please sign in to comment.