Skip to content

Commit

Permalink
feat: add downstream nerfstudio test (#1996)
Browse files Browse the repository at this point in the history
Attempts to add a downstream nerfstudio test
  • Loading branch information
tdejager authored Sep 9, 2024
1 parent b1d4ba2 commit ba66bd0
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 32 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,18 @@ jobs:
fail-fast: false
matrix:
include:
- { name: "Linux", target: x86_64-unknown-linux-musl, os: 8core_ubuntu_latest_runner }
- { name: "macOS", target: x86_64-apple-darwin, os: macos-13 }
- { name: "macOS-arm", target: aarch64-apple-darwin, os: macos-14 }
- { name: "Windows", target: x86_64-pc-windows-msvc, os: 16core_windows_latest_runner }
- {
name: "Linux",
target: x86_64-unknown-linux-musl,
os: 8core_ubuntu_latest_runner,
}
- { name: "macOS", target: x86_64-apple-darwin, os: macos-13 }
- { name: "macOS-arm", target: aarch64-apple-darwin, os: macos-14 }
- {
name: "Windows",
target: x86_64-pc-windows-msvc,
os: 16core_windows_latest_runner,
}
steps:
- uses: actions/checkout@v4
- uses: taiki-e/setup-cross-toolchain-action@v1
Expand Down Expand Up @@ -408,6 +416,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

downstream_tests:
name: "Test downstream projects"
needs:
- build
uses: ./.github/workflows/test_downstream.yml
78 changes: 50 additions & 28 deletions .github/workflows/test_downstream.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,42 @@ on:
jobs:
# Install a couple of projects that we know use pixi
test-downstream:
name: Downstream test ${{ matrix.repository }} on ${{ matrix.os }}
# if: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' }}
name: ${{ matrix.arch.name }} - ${{ matrix.repository }}
runs-on: ${{ matrix.arch.os }}
strategy:
fail-fast: false
matrix:
arch:
# Linux
- { target: x86_64-unknown-linux-musl, os: ubuntu-20.04 }
- {
target: x86_64-unknown-linux-musl,
os: 8core_ubuntu_latest_runner,
name: "Linux",
}
# MacOS
- { target: x86_64-apple-darwin, os: macos-13 }
- { target: aarch64-apple-darwin, os: macos-14 } # macOS-14 is the ARM chipset
- { target: x86_64-apple-darwin, os: macos-13, name: "MacOS-x86" }
- { target: aarch64-apple-darwin, os: macos-14, name: "MacOS-Arm" } # macOS-14 is the ARM chipset
# Windows
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
extension: .exe,
name: "Windows",
}
repository:
- Deltares/Ribasim
- quantco/polarify
include:
# Include specific nerfstudio test
- arch:
{
target: x86_64-unknown-linux-musl,
os: 8core_ubuntu_latest_runner,
name: "Linux",
}
repository: nerfstudio-project/nerfstudio
env:
CONDA_OVERRIDE_CUDA: "11.8"
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -39,23 +54,23 @@ jobs:
name: pixi-${{ matrix.arch.target }}${{ matrix.arch.extension }}
path: pixi_bin
- name: Setup unix binary, add to github path
if: matrix.arch.os != 'windows-latest'
if: matrix.arch.name != 'Windows'
run: |
mv pixi_bin/pixi-${{ matrix.arch.target }} pixi_bin/pixi
chmod a+x pixi_bin/pixi
echo "$(pwd)/pixi_bin" >> $GITHUB_PATH
- name: Create Directory and Move Executable
if: matrix.arch.os == 'windows-latest' && matrix.arch.target == 'x86_64-pc-windows-msvc'
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc'
run: |
New-Item -ItemType Directory -Force -Path "D:\.pixi"
Move-Item -Path "pixi_bin/pixi-${{ matrix.arch.target }}${{ matrix.arch.extension }}" -Destination "D:\.pixi\pixi.exe"
shell: pwsh
- name: Add to PATH
if: matrix.arch.os == 'windows-latest' && matrix.arch.target == 'x86_64-pc-windows-msvc'
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc'
run: echo "D:\.pixi" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_PATH
shell: pwsh
- name: Verify and Use Executable
if: matrix.arch.os == 'windows-latest' && matrix.arch.target == 'x86_64-pc-windows-msvc'
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc'
run: |
echo "Current PATH: $env:PATH"
pixi --version
Expand All @@ -64,30 +79,32 @@ jobs:
run: pixi --help
- name: Info
run: pixi info

- name: Install repository
run: pixi install -v
- name: Check lockfile didn't change
run: git diff --exit-code pixi.lock

# Test all of the examples
test-examples:
name: Test examples on ${{ matrix.arch.os }}
name: ${{ matrix.arch.name }} - Test Examples
runs-on: ${{ matrix.arch.os }}
strategy:
fail-fast: false
matrix:
arch:
# Linux
- { target: x86_64-unknown-linux-musl, os: ubuntu-20.04 }
- {
target: x86_64-unknown-linux-musl,
os: ubuntu-20.04,
name: "Linux",
}
# MacOS
- { target: x86_64-apple-darwin, os: macos-13 }
- { target: aarch64-apple-darwin, os: macos-14 } # macOS-14 is the ARM chipset
- { target: x86_64-apple-darwin, os: macos-13, name: "MacOS-x86" }
- { target: aarch64-apple-darwin, os: macos-14, name: "MacOS-arm" } # macOS-14 is the ARM chipset
# Windows
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
extension: .exe,
name: "Windows",
}
steps:
- name: checkout repo
Expand All @@ -101,23 +118,23 @@ jobs:
run: |
pwd
- name: Setup unix binary, add to github path
if: matrix.arch.os != 'windows-latest'
if: matrix.arch.name != 'Windows'
run: |
mv pixi_bin/pixi-${{ matrix.arch.target }} pixi_bin/pixi
chmod a+x pixi_bin/pixi
echo "$(pwd)/pixi_bin" >> $GITHUB_PATH
- name: Create Directory and Move Executable
if: matrix.arch.os == 'windows-latest' && matrix.arch.target == 'x86_64-pc-windows-msvc'
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc'
run: |
New-Item -ItemType Directory -Force -Path "D:\.pixi"
Move-Item -Path "pixi_bin/pixi-${{ matrix.arch.target }}${{ matrix.arch.extension }}" -Destination "D:\.pixi\pixi.exe"
shell: pwsh
- name: Add to PATH
if: matrix.arch.os == 'windows-latest' && matrix.arch.target == 'x86_64-pc-windows-msvc'
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc'
run: echo "D:\.pixi" | Out-File -Append -Encoding utf8 -FilePath $env:GITHUB_PATH
shell: pwsh
- name: Verify and Use Executable
if: matrix.arch.os == 'windows-latest' && matrix.arch.target == 'x86_64-pc-windows-msvc'
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc'
run: |
echo "Current PATH: $env:PATH"
pixi --version
Expand All @@ -135,7 +152,7 @@ jobs:
# Run integration tests that test the command line
# pixi interface
test-integration:
name: Integration test on ${{ matrix.arch.os }}
name: ${{ matrix.arch.name }} - Integration Tests
runs-on: ${{ matrix.arch.os }}
env:
TARGET_RELEASE: "${{ github.workspace }}/.pixi/target/release"
Expand All @@ -144,15 +161,20 @@ jobs:
matrix:
arch:
# Linux
- { target: x86_64-unknown-linux-musl, os: ubuntu-20.04 }
- {
target: x86_64-unknown-linux-musl,
os: ubuntu-20.04,
name: "Linux",
}
# MacOS
- { target: x86_64-apple-darwin, os: macos-13 }
- { target: aarch64-apple-darwin, os: macos-14 } # macOS-14 is the ARM chipset
- { target: x86_64-apple-darwin, os: macos-13, name: "MacOS-x86" }
- { target: aarch64-apple-darwin, os: macos-14, name: "MacOS-arm" } # macOS-14 is the ARM chipset
# Windows
- {
target: x86_64-pc-windows-msvc,
os: windows-latest,
extension: .exe,
name: "Windows",
}
steps:
- name: Checkout repo
Expand All @@ -166,18 +188,18 @@ jobs:
run: |
pwd
- name: Setup unix binary, add to github path
if: matrix.arch.os != 'windows-latest'
if: matrix.arch.name != 'Windows'
run: |
mkdir -p ${{ env.TARGET_RELEASE }}
mv pixi_bin/pixi-${{ matrix.arch.target }} ${{ env.TARGET_RELEASE }}/pixi
chmod a+x ${{ env.TARGET_RELEASE }}/pixi
- name: Create Directory and Move Executable
if: matrix.arch.os == 'windows-latest' && matrix.arch.target == 'x86_64-pc-windows-msvc'
if: matrix.arch.name == 'Windows' && matrix.arch.target == 'x86_64-pc-windows-msvc'
run: |
New-Item -ItemType Directory -Force -Path "${{ env.TARGET_RELEASE }}"
Move-Item -Path "pixi_bin/pixi-${{ matrix.arch.target }}${{ matrix.arch.extension }}" -Destination "${{ env.TARGET_RELEASE }}/pixi.exe"
shell: pwsh
- name: Typecheck integration tests
run: ${{ env.TARGET_RELEASE }}/pixi run typecheck-integration
run: ${{ env.TARGET_RELEASE }}/pixi${{ matrix.arch.extension }} run typecheck-integration
- name: Run integration tests
run: ${{ env.TARGET_RELEASE }}/pixi run test-integration-ci
run: ${{ env.TARGET_RELEASE }}/pixi${{ matrix.arch.extension }} run test-integration-ci

0 comments on commit ba66bd0

Please sign in to comment.