Skip to content

Commit 0e5a9f0

Browse files
authored
Merge pull request #438 from NixOS/ci
build patchelf on windows
2 parents d6ee352 + 199b134 commit 0e5a9f0

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

.github/workflows/publish.yml

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,50 @@ jobs:
1717
- uses: cachix/install-nix-action@v18
1818
- name: Build tarballs
1919
run: |
20-
nix-build -A hydraJobs.tarball
20+
nix build -L .#hydraJobs.tarball
2121
install -D ./result/tarballs/*.tar.bz2 ./dist/patchelf-$(cat version).tar.bz2
2222
install -D ./result/tarballs/*.tar.gz ./dist/patchelf-$(cat version).tar.gz
2323
- uses: actions/upload-artifact@v3
2424
with:
2525
name: patchelf
2626
path: dist/*
2727

28-
build_binaries:
28+
build_windows:
29+
name: Build windows executable
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v3
34+
- uses: cachix/install-nix-action@v18
35+
- name: Build windows executable
36+
run: |
37+
nix build -L .#patchelf-win32 .#patchelf-win64
38+
install -D ./result/bin/patchelf.exe ./dist/patchelf-win32.exe
39+
install -D ./result-1/bin/patchelf.exe ./dist/patchelf-win64.exe
40+
- uses: actions/upload-artifact@v3
41+
with:
42+
name: patchelf
43+
path: dist/*
44+
45+
test_windows:
46+
name: Test windows binaries
47+
needs: [build_windows]
48+
runs-on: windows-latest
49+
steps:
50+
- uses: actions/checkout@v2
51+
- uses: actions/download-artifact@v3
52+
with:
53+
name: patchelf
54+
path: dist
55+
- name: Show binaries
56+
run: dir .\\dist
57+
- name: Test windows 64-bit binary
58+
run: .\\dist\\patchelf-win32.exe --version
59+
60+
- name: Test windows 32-bit binary
61+
run: .\\dist\\patchelf-win64.exe --version
62+
63+
build_musl:
2964
name: Build static musl binaries
3065
needs: [build_tarballs]
3166
runs-on: ubuntu-latest
@@ -82,7 +117,7 @@ jobs:
82117

83118
publish:
84119
name: Publish tarballs & binaries
85-
needs: [build_tarballs, build_binaries]
120+
needs: [build_tarballs, build_windows, build_musl]
86121
if: github.event_name == 'push' && github.repository == 'NixOS/patchelf' && startsWith(github.ref, 'refs/tags/')
87122
runs-on: ubuntu-latest
88123
steps:

0 commit comments

Comments
 (0)