Skip to content

Commit

Permalink
Final adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
4r7if3x committed Jun 7, 2023
1 parent 61b93bb commit ca11098
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,30 @@ jobs:
fail-fast: true
matrix:
include:
- os: ubuntu
arch: amd64
target: x86_64-unknown-linux-gnu
- os: ubuntu
arch: i386
target: i686-unknown-linux-gnu
- os: ubuntu
arch: arm64
target: aarch64-unknown-linux-gnu
- os: ubuntu
arch: armhf
target: armv7-unknown-linux-gnueabihf
- os: ubuntu
arch: amd64
target: x86_64-unknown-linux-gnu
- os: ubuntu
arch: arm64
target: aarch64-unknown-linux-gnu
- os: macos
arch: amd64
target: x86_64-apple-darwin
- os: macos
arch: arm64
target: aarch64-apple-darwin
- os: windows
arch: amd64
target: x86_64-pc-windows-msvc
- os: windows
arch: i386
target: i686-pc-windows-msvc
- os: windows
arch: amd64
target: x86_64-pc-windows-msvc

steps:
- name: Checkout repository
Expand All @@ -57,7 +57,6 @@ jobs:
{
"i386" { "Lib" }
"amd64" { "Lib\x64" }
"arm64" { "Lib\ARM64" }
default { throw "$ARCH is not supported!" }
}
Add-Content -Path "$env:GITHUB_ENV" -Value "LIB=$env:TEMP\npcap-sdk\$LibPath"
Expand Down Expand Up @@ -85,8 +84,8 @@ jobs:
if: ${{ matrix.os == 'windows' }}
run: |
rustup target add `
x86_64-pc-windows-msvc `
i686-pc-windows-msvc
i686-pc-windows-msvc `
x86_64-pc-windows-msvc
- name: Install Cross
if: ${{ matrix.os == 'ubuntu' }}
Expand Down Expand Up @@ -143,10 +142,10 @@ jobs:
shell: bash
run: |
targets=(
x86_64-unknown-linux-gnu
i686-unknown-linux-gnu
aarch64-unknown-linux-gnu
armv7-unknown-linux-gnueabihf
x86_64-unknown-linux-gnu
aarch64-unknown-linux-gnu
)
mkdir artifacts
for target in "${targets[@]}"; do
Expand Down Expand Up @@ -196,7 +195,7 @@ jobs:
)
mkdir artifacts
for target in "${targets[@]}"; do
patchelf --replace-needed libpcap.so.0.8 libpcap.so target/${target}/release/sniffnet
patchelf --replace-needed libpcap.so.0.8 libpcap.so.1 target/${target}/release/sniffnet
cargo generate-rpm --target $target
mv target/${target}/generate-rpm/*.rpm artifacts/
done
Expand Down Expand Up @@ -306,8 +305,8 @@ jobs:
shell: powershell
run: |
$targets=@(
"x86_64-pc-windows-msvc",
"i686-pc-windows-msvc"
"i686-pc-windows-msvc",
"x86_64-pc-windows-msvc"
)
New-Item -ItemType Directory -Path artifacts
foreach ($target in $targets)
Expand Down

0 comments on commit ca11098

Please sign in to comment.