forked from prefix-dev/pixi
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (110 loc) · 3.92 KB
/
test_downstream.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
on:
workflow_call:
inputs:
os:
description: "Operating system to test"
required: true
type: string
target:
description: "Target to test"
required: true
type: string
extension:
description: "Extension of the binary"
required: false
type: string
jobs:
test-downstream:
name: Downstream test ${{ matrix.repository }} on ${{ matrix.os }}
if: ${{ startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main' }}
runs-on: ${{ inputs.os }}
strategy:
fail-fast: false
matrix:
repository: [ "Deltares/Ribasim", "quantco/polarify" ]
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
repository: ${{ matrix.repository }}
# Setup pixi binary
- name: Download binary from build
uses: actions/download-artifact@v4
with:
name: pixi-${{ inputs.target }}${{ inputs.extension }}
path: pixi_bin
- name: Setup unix binary, add to github path
if: inputs.os != 'windows-latest'
run: |
mv pixi_bin/pixi-${{ inputs.target }} pixi_bin/pixi
chmod a+x pixi_bin/pixi
echo "$(pwd)/pixi_bin" >> $GITHUB_PATH
- name: Create Directory and Move Executable
if: inputs.os == 'windows-latest' && inputs.target == 'x86_64-pc-windows-msvc'
run: |
New-Item -ItemType Directory -Force -Path "D:\.pixi"
Move-Item -Path "pixi_bin/pixi-${{ inputs.target }}${{ inputs.extension }}" -Destination "D:\.pixi\pixi.exe"
shell: pwsh
- name: Add to PATH
if: inputs.os == 'windows-latest' && inputs.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: inputs.os == 'windows-latest' && inputs.target == 'x86_64-pc-windows-msvc'
run: |
echo "Current PATH: $env:PATH"
pixi --version
shell: pwsh
- name: Help
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-examples:
name: Integration test on ${{ inputs.os }}
runs-on: ${{ inputs.os }}
steps:
- name: checkout repo
uses: actions/checkout@v4
- name: Download binary from build
uses: actions/download-artifact@v4
with:
name: pixi-${{ inputs.target }}${{ inputs.extension }}
path: pixi_bin
- name: Debug
run: |
pwd
- name: Setup unix binary, add to github path
if: inputs.os != 'windows-latest'
run: |
mv pixi_bin/pixi-${{ inputs.target }} pixi_bin/pixi
chmod a+x pixi_bin/pixi
echo "$(pwd)/pixi_bin" >> $GITHUB_PATH
- name: Create Directory and Move Executable
if: inputs.os == 'windows-latest' && inputs.target == 'x86_64-pc-windows-msvc'
run: |
New-Item -ItemType Directory -Force -Path "D:\.pixi"
Move-Item -Path "pixi_bin/pixi-${{ inputs.target }}${{ inputs.extension }}" -Destination "D:\.pixi\pixi.exe"
shell: pwsh
- name: Add to PATH
if: inputs.os == 'windows-latest' && inputs.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: inputs.os == 'windows-latest' && inputs.target == 'x86_64-pc-windows-msvc'
run: |
echo "Current PATH: $env:PATH"
pixi --version
shell: pwsh
- name: Help
run: pixi --help
- name: Info
run: pixi info
- name: Install pixi
run: pixi install -v
- name: Test examples
shell: bash
run: bash tests/test_examples.sh