Skip to content

Commit

Permalink
migrating from actions-rs to dtolnay stuff; matrix build; test 7
Browse files Browse the repository at this point in the history
  • Loading branch information
epi052 committed Sep 15, 2024
1 parent 4f959f9 commit a0a8366
Showing 1 changed file with 26 additions and 53 deletions.
79 changes: 26 additions & 53 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,27 +49,6 @@ jobs:
args: "--locked --release"
strip: true
toolchain: stable

# - uses: actions/checkout@v4
# - name: Install System Dependencies
# run: |
# env
# sudo apt-get update
# sudo apt-get install -y --no-install-recommends libssl-dev pkg-config gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu musl-tools
# - name: Set up Rust toolchain
# uses: dtolnay/rust-toolchain@master
# env:
# PKG_CONFIG_PATH: ${{ matrix.pkg_config_path }}
# OPENSSL_DIR: /usr/lib/ssl
# with:
# toolchain: stable
# run: \
# cargo install cross --git https://github.com/cross-rs/cross
# cross build --target ${{ matrix.target }} --release

# - name: Strip symbols from binary
# run: |
# strip -s ${{ matrix.path }} || arm-linux-gnueabihf-strip -s ${{ matrix.path }} || aarch64-linux-gnu-strip -s ${{ matrix.path }}
- name: Build tar.gz for homebrew installs
if: matrix.type == 'ubuntu-x64'
run: |
Expand Down Expand Up @@ -139,22 +118,19 @@ jobs:
env:
IN_PIPELINE: true
runs-on: macos-latest
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
override: true
- uses: actions-rs/cargo@v1
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
use-cross: true
command: build
args: --release --target=x86_64-apple-darwin
- name: Strip symbols from binary
run: |
strip -u -r target/x86_64-apple-darwin/release/feroxbuster
target: x86_64-apple-darwin
args: "--locked --release"
strip: true
toolchain: stable
- name: Build tar.gz for homebrew installs
run: |
tar czf x86_64-macos-feroxbuster.tar.gz -C target/x86_64-apple-darwin/release feroxbuster
Expand All @@ -174,19 +150,16 @@ jobs:
# if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: aarch64-apple-darwin
override: true
- uses: actions-rs/cargo@v1
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
use-cross: true
command: build
args: --release --target=aarch64-apple-darwin
- name: Strip symbols from binary
run: |
strip -u -r target/aarch64-apple-darwin/release/feroxbuster
target: aarch64-apple-darwin
args: "--locked --release"
strip: true
toolchain: stable
- name: Build tar.gz for homebrew installs
run: |
tar czf aarch64-macos-feroxbuster.tar.gz -C target/aarch64-apple-darwin/release feroxbuster
Expand All @@ -203,7 +176,7 @@ jobs:
env:
IN_PIPELINE: true
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/main'
# if: github.ref == 'refs/heads/main'
strategy:
matrix:
type: [windows-x64, windows-x86]
Expand All @@ -220,16 +193,16 @@ jobs:
path: target\i686-pc-windows-msvc\release\feroxbuster.exe
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ matrix.target }}
override: true
- uses: actions-rs/cargo@v1
- name: Cache cargo & target directories
uses: Swatinem/rust-cache@v2
- name: Build binary
uses: houseabsolute/actions-rust-cross@v0
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
target: ${{ matrix.target }}
args: "--locked --release"
strip: true
toolchain: stable
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.name }}
Expand Down

0 comments on commit a0a8366

Please sign in to comment.