-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
renamed testing and added CI for packaging #688
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,34 +1,208 @@ | ||
| name: Build | ||
| on: | ||
| pull_request: | ||
| branches: [master] | ||
| push: | ||
| branches: | ||
| - master | ||
| name: CD Pipeline | ||
|
|
||
| on: [push] | ||
|
|
||
| jobs: | ||
| test: | ||
| name: Test Suite | ||
| build-nix: | ||
| env: | ||
| IN_PIPELINE: true | ||
| runs-on: ${{ matrix.os }} | ||
| if: github.ref == 'refs/heads/main' | ||
bee-san marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| rust: [stable] | ||
| runs-on: ${{ matrix.os }} | ||
| type: [ubuntu-x64, ubuntu-x86, armv7, aarch64] | ||
| include: | ||
| - type: ubuntu-x64 | ||
| os: ubuntu-latest | ||
| target: x86_64-unknown-linux-musl | ||
| name: x86_64-linux-rustscan | ||
| path: target/x86_64-unknown-linux-musl/release/rustscan | ||
| pkg_config_path: /usr/lib/x86_64-linux-gnu/pkgconfig | ||
| - type: ubuntu-x86 | ||
| os: ubuntu-latest | ||
| target: i686-unknown-linux-musl | ||
| name: x86-linux-rustscan | ||
| path: target/i686-unknown-linux-musl/release/rustscan | ||
| pkg_config_path: /usr/lib/i686-linux-gnu/pkgconfig | ||
| - type: armv7 | ||
| os: ubuntu-latest | ||
| target: armv7-unknown-linux-gnueabihf | ||
| name: armv7-linux-rustscan | ||
| path: target/armv7-unknown-linux-gnueabihf/release/rustscan | ||
| pkg_config_path: /usr/lib/x86_64-linux-gnu/pkgconfig | ||
| - type: aarch64 | ||
| os: ubuntu-latest | ||
| target: aarch64-unknown-linux-gnu | ||
| name: aarch64-linux-rustscan | ||
| path: target/aarch64-unknown-linux-gnu/release/rustscan | ||
| pkg_config_path: /usr/lib/x86_64-linux-gnu/pkgconfig | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Cache cargo & target directories | ||
| uses: Swatinem/rust-cache@v2 | ||
| - name: Build binary | ||
| uses: houseabsolute/actions-rust-cross@v0 | ||
| with: | ||
| command: build | ||
| target: ${{ matrix.target }} | ||
| args: "--locked --release" | ||
| strip: true | ||
| toolchain: stable | ||
| - name: Build tar.gz for homebrew installs | ||
| if: matrix.type == 'ubuntu-x64' | ||
| run: | | ||
| tar czf ${{ matrix.name }}.tar.gz -C target/x86_64-unknown-linux-musl/release rustscan | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.name }} | ||
| path: ${{ matrix.path }} | ||
| - uses: actions/upload-artifact@v4 | ||
| if: matrix.type == 'ubuntu-x64' | ||
| with: | ||
| name: ${{ matrix.name }}.tar.gz | ||
| path: ${{ matrix.name }}.tar.gz | ||
|
|
||
| build-debug: | ||
bee-san marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| env: | ||
| IN_PIPELINE: true | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
| - 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 musl-tools | ||
| - name: Set up Rust toolchain | ||
| uses: dtolnay/rust-toolchain@master | ||
| with: | ||
| toolchain: stable | ||
| target: x86_64-unknown-linux-musl | ||
|
|
||
| - name: Install stable toolchain | ||
| uses: actions-rs/toolchain@v1 | ||
| - name: Build the project | ||
| env: | ||
| PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig | ||
| OPENSSL_DIR: /usr/lib/ssl | ||
| run: cargo build --target=x86_64-unknown-linux-musl | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| profile: minimal | ||
| toolchain: ${{ matrix.rust }} | ||
| override: true | ||
| name: x86_64-linux-debug-rustscan | ||
| path: target/x86_64-unknown-linux-musl/debug/rustscan | ||
|
|
||
| - uses: taiki-e/install-action@nextest | ||
| - uses: Swatinem/rust-cache@v2 | ||
| build-deb: | ||
| needs: [build-nix] | ||
| runs-on: ubuntu-latest | ||
| env: | ||
| IN_PIPELINE: true | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Install cargo-deb | ||
| run: cargo install -f cargo-deb | ||
| - uses: awalsh128/cache-apt-pkgs-action@v1 | ||
| with: | ||
| packages: musl-tools # provides musl-gcc | ||
| version: 1.0 | ||
| - name: Install musl toolchain | ||
| run: rustup target add x86_64-unknown-linux-musl | ||
| - name: Deb Build | ||
| run: cargo deb --target=x86_64-unknown-linux-musl | ||
| - name: Upload Deb Artifact | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: rustscan.deb | ||
| path: ./target/x86_64-unknown-linux-musl/debian/* | ||
|
|
||
| - name: Install Just | ||
| uses: extractions/setup-just@v2 | ||
| build-macos: | ||
| env: | ||
| IN_PIPELINE: true | ||
| runs-on: macos-latest | ||
| if: github.ref == 'refs/heads/main' | ||
bee-san marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Cache cargo & target directories | ||
| uses: Swatinem/rust-cache@v2 | ||
| - name: Build binary | ||
| uses: houseabsolute/actions-rust-cross@v0 | ||
| with: | ||
| command: build | ||
| 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-rustscan.tar.gz -C target/x86_64-apple-darwin/release rustscan | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: x86_64-macos-rustscan | ||
| path: target/x86_64-apple-darwin/release/rustscan | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: x86_64-macos-rustscan.tar.gz | ||
| path: x86_64-macos-rustscan.tar.gz | ||
|
|
||
| build-macos-aarch64: | ||
| env: | ||
| IN_PIPELINE: true | ||
| runs-on: macos-latest | ||
| if: github.ref == 'refs/heads/main' | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Cache cargo & target directories | ||
| uses: Swatinem/rust-cache@v2 | ||
| - name: Build binary | ||
| uses: houseabsolute/actions-rust-cross@v0 | ||
| with: | ||
| command: build | ||
| target: aarch64-apple-darwin | ||
| args: "--locked --release" | ||
| strip: true | ||
| toolchain: stable | ||
| - name: Build tar.gz for homebrew installs | ||
| run: | | ||
| tar czf aarch64-macos-rustscan.tar.gz -C target/aarch64-apple-darwin/release rustscan | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: aarch64-macos-rustscan | ||
| path: target/aarch64-apple-darwin/release/rustscan | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: aarch64-macos-rustscan.tar.gz | ||
| path: aarch64-macos-rustscan.tar.gz | ||
|
|
||
| - name: Run just | ||
| run: just test | ||
| build-windows: | ||
| env: | ||
| IN_PIPELINE: true | ||
| runs-on: ${{ matrix.os }} | ||
| if: github.ref == 'refs/heads/main' | ||
bee-san marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| strategy: | ||
| matrix: | ||
| type: [windows-x64, windows-x86] | ||
| include: | ||
| - type: windows-x64 | ||
| os: windows-latest | ||
| target: x86_64-pc-windows-msvc | ||
| name: x86_64-windows-rustscan.exe | ||
| path: target\x86_64-pc-windows-msvc\release\rustscan.exe | ||
| - type: windows-x86 | ||
| os: windows-latest | ||
| target: i686-pc-windows-msvc | ||
| name: x86-windows-rustscan.exe | ||
| path: target\i686-pc-windows-msvc\release\rustscan.exe | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Cache cargo & target directories | ||
| uses: Swatinem/rust-cache@v2 | ||
| - name: Build binary | ||
| uses: houseabsolute/actions-rust-cross@v0 | ||
| with: | ||
| command: build | ||
| target: ${{ matrix.target }} | ||
| args: "--locked --release" | ||
| strip: true | ||
| toolchain: stable | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.name }} | ||
| path: ${{ matrix.path }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| name: Build | ||
bee-san marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| on: | ||
| pull_request: | ||
| branches: [master] | ||
| push: | ||
| branches: | ||
| - master | ||
| jobs: | ||
| test: | ||
| name: Test Suite | ||
| strategy: | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| rust: [stable] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Checkout sources | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Install stable toolchain | ||
| uses: actions-rs/toolchain@v1 | ||
| with: | ||
| profile: minimal | ||
bee-san marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| toolchain: ${{ matrix.rust }} | ||
| override: true | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I needed to add |
||
|
|
||
| - uses: taiki-e/install-action@nextest | ||
| - uses: Swatinem/rust-cache@v2 | ||
|
|
||
| - name: Install Just | ||
| uses: extractions/setup-just@v2 | ||
|
|
||
| - name: Run just | ||
| run: just test | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This builds but fails at the
actions/upload-artifact@v4stage, as expected.