Skip to content

Commit

Permalink
Merge pull request #438 from NixOS/ci
Browse files Browse the repository at this point in the history
build patchelf on windows
  • Loading branch information
Mic92 authored Nov 6, 2022
2 parents d6ee352 + 199b134 commit 0e5a9f0
Showing 1 changed file with 38 additions and 3 deletions.
41 changes: 38 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,50 @@ jobs:
- uses: cachix/install-nix-action@v18
- name: Build tarballs
run: |
nix-build -A hydraJobs.tarball
nix build -L .#hydraJobs.tarball
install -D ./result/tarballs/*.tar.bz2 ./dist/patchelf-$(cat version).tar.bz2
install -D ./result/tarballs/*.tar.gz ./dist/patchelf-$(cat version).tar.gz
- uses: actions/upload-artifact@v3
with:
name: patchelf
path: dist/*

build_binaries:
build_windows:
name: Build windows executable
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
- name: Build windows executable
run: |
nix build -L .#patchelf-win32 .#patchelf-win64
install -D ./result/bin/patchelf.exe ./dist/patchelf-win32.exe
install -D ./result-1/bin/patchelf.exe ./dist/patchelf-win64.exe
- uses: actions/upload-artifact@v3
with:
name: patchelf
path: dist/*

test_windows:
name: Test windows binaries
needs: [build_windows]
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v3
with:
name: patchelf
path: dist
- name: Show binaries
run: dir .\\dist
- name: Test windows 64-bit binary
run: .\\dist\\patchelf-win32.exe --version

- name: Test windows 32-bit binary
run: .\\dist\\patchelf-win64.exe --version

build_musl:
name: Build static musl binaries
needs: [build_tarballs]
runs-on: ubuntu-latest
Expand Down Expand Up @@ -82,7 +117,7 @@ jobs:

publish:
name: Publish tarballs & binaries
needs: [build_tarballs, build_binaries]
needs: [build_tarballs, build_windows, build_musl]
if: github.event_name == 'push' && github.repository == 'NixOS/patchelf' && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 0e5a9f0

Please sign in to comment.