Skip to content

Commit

Permalink
feat(ci): support windows builds (attempt building on the windows run…
Browse files Browse the repository at this point in the history
…ner)
  • Loading branch information
usagi-flow committed Aug 29, 2024
1 parent aae4346 commit ca0bc67
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/evil-build-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ jobs:

- name: Install binstall
uses: "cargo-bins/[email protected]"
if: ${{ !matrix.target.native}}
if: ${{ !matrix.target.native }}

- name: "Install cross"
run: "cargo binstall -y cross"
if: ${{ !matrix.target.native}}
if: ${{ !matrix.target.native }}

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -61,11 +61,11 @@ jobs:
run: |
rustup target add ${{ matrix.target.id }}
cargo build --target ${{ matrix.target.id }} --profile $BUILD_PROFILE
if: ${{ matrix.target.native}}
if: ${{ matrix.target.native }}

- name: Build (cross)
run: cross build --target ${{ matrix.target.id }} --profile $BUILD_PROFILE
if: ${{ !matrix.target.native}}
if: ${{ !matrix.target.native }}

- name: "Prepare dist"
shell: bash
Expand All @@ -89,9 +89,11 @@ jobs:
with:
name: "evil-helix-${{ matrix.target.name }}"
path: "dist/evil-helix-${{ matrix.target.name }}.tar.gz"
if: ${{ matrix.target.id != 'x86_64-pc-windows-gnu' }}

- name: "Upload artifacts (zip)"
uses: actions/upload-artifact@v4
with:
name: "evil-helix-${{ matrix.target.name }}"
path: "dist/helix"
if: ${{ matrix.target.id == 'x86_64-pc-windows-gnu' }}
10 changes: 6 additions & 4 deletions .github/workflows/evil-build-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ jobs:

- name: Install binstall
uses: "cargo-bins/[email protected]"
if: ${{ !matrix.target.native}}
if: ${{ !matrix.target.native }}

- name: "Install cross"
run: "cargo binstall -y cross"
if: ${{ !matrix.target.native}}
if: ${{ !matrix.target.native }}

- uses: Swatinem/rust-cache@v2
with:
Expand All @@ -82,11 +82,11 @@ jobs:
run: |
rustup target add ${{ matrix.target.id }}
cargo build --target ${{ matrix.target.id }} --profile $BUILD_PROFILE
if: ${{ matrix.target.native}}
if: ${{ matrix.target.native }}

- name: Build (cross)
run: cross build --target ${{ matrix.target.id }} --profile $BUILD_PROFILE
if: ${{ !matrix.target.native}}
if: ${{ !matrix.target.native }}

- name: "Prepare dist"
shell: bash
Expand All @@ -110,12 +110,14 @@ jobs:
with:
name: "evil-helix-${{ matrix.target.name }}"
path: "dist/evil-helix-${{ matrix.target.name }}.tar.gz"
if: ${{ matrix.target.id != 'x86_64-pc-windows-gnu' }}

- name: "Upload artifacts (zip)"
uses: actions/upload-artifact@v4
with:
name: "evil-helix-${{ matrix.target.name }}"
path: "dist/helix"
if: ${{ matrix.target.id == 'x86_64-pc-windows-gnu' }}

- name: Release suffix
id: release-suffix
Expand Down

0 comments on commit ca0bc67

Please sign in to comment.