Skip to content

Commit

Permalink
update build
Browse files Browse the repository at this point in the history
  • Loading branch information
bck01215 committed Jul 10, 2024
1 parent 52fabf7 commit cd8c747
Show file tree
Hide file tree
Showing 3 changed files with 81 additions and 90 deletions.
17 changes: 4 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.arch }}-build-cargo-${{ hashFiles('**/Cargo.lock') }}
key: ${{ matrix.arch }}-build-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install dependencies for linux
if: contains(matrix.arch, 'linux')
run: |
Expand All @@ -67,24 +67,15 @@ jobs:
override: true

- name: Output package versions
run: |
cargo version ; rustc --version ; gcc --version ; g++ --version
- name: Install cross
if: contains(matrix.arch, 'linux')
run: cargo install cross --git https://github.com/cross-rs/cross
run: |
cargo version ; rustc --version ; gcc --version ; g++ --version
- name: Print rustc cfg
run: rustc -C target-cpu=native --print cfg

- name: Run cargo build
if: contains(matrix.arch, 'linux') == false
run: cargo build --release --target ${{ matrix.arch }}

- name: Run cross build
if: contains(matrix.arch, 'linux')
run: cross build --release --target ${{ matrix.arch }}

- name: Calculate checksum and rename binary
if: contains(matrix.arch, 'windows') == false
shell: bash
Expand Down Expand Up @@ -130,4 +121,4 @@ jobs:
name: "Release ${{ github.ref_name }}"
generate_release_notes: true
files: |
**/elasticnow-*
**/elasticnow-*
Loading

0 comments on commit cd8c747

Please sign in to comment.