Skip to content

Commit c1ba4aa

Browse files
committed
Test binaries on all OS'es
1 parent a5f40be commit c1ba4aa

1 file changed

Lines changed: 32 additions & 6 deletions

File tree

.github/workflows/build.yml

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,47 @@ jobs:
7373
path: build/dfetch-*
7474

7575
test-binary:
76-
name: Run binary
76+
name: test binary
7777
needs:
7878
- build
79-
runs-on: ubuntu-latest
79+
strategy:
80+
matrix:
81+
platform: [ubuntu-latest, macos-latest, windows-latest]
82+
runs-on: ${{ matrix.platform }}
8083

8184
steps:
8285
- name: Download the binary artifact
8386
uses: actions/download-artifact@4a24838f3d5601fd639834081e118c2995d51e1c # v5
8487
with:
85-
name: binary-distribution-ubuntu-latest
88+
name: binary-distribution-${{ matrix.platform }}
8689
path: .
8790

88-
- run: ln -sf $(ls dfetch-*-x86_64) dfetch
89-
- run: chmod +x dfetch
90-
- run: ls -la .
91+
- name: Prepare binary
92+
if: matrix.platform == 'ubuntu-latest'
93+
run: |
94+
binary=$(ls dfetch-*-x86_64)
95+
ln -sf "$binary" dfetch
96+
chmod +x dfetch
97+
ls -la .
98+
shell: bash
99+
100+
- name: Prepare binary
101+
if: matrix.platform == 'macos-latest'
102+
run: |
103+
binary=$(ls dfetch-*-osx)
104+
ln -sf "$binary" dfetch
105+
chmod +x dfetch
106+
ls -la .
107+
shell: bash
108+
109+
- name: Prepare binary on Windows
110+
if: matrix.platform == 'windows-latest'
111+
run: |
112+
$binary = Get-ChildItem dfetch-*-x86_64.exe | Select-Object -First 1
113+
Copy-Item $binary -Destination dfetch.exe -Force
114+
Get-ChildItem
115+
shell: pwsh
116+
91117
- run: ./dfetch init
92118
- run: ./dfetch environment
93119
- run: ./dfetch validate

0 commit comments

Comments
 (0)