Skip to content

Commit

Permalink
ci: Fix windows-msvc build failure
Browse files Browse the repository at this point in the history
Split Windows and -nix asset preparation steps
  • Loading branch information
matchai committed Oct 20, 2019
1 parent 2461b84 commit fbb4b59
Showing 1 changed file with 22 additions and 16 deletions.
38 changes: 22 additions & 16 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
Expand All @@ -34,9 +36,10 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Expand Down Expand Up @@ -66,6 +69,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
Expand All @@ -91,6 +95,7 @@ jobs:
# Install all the required dependencies for testing
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

Expand Down Expand Up @@ -154,6 +159,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- run: cargo login $CRATES_IO_TOKEN
Expand All @@ -170,9 +176,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- run: |
git config --global user.name starship-bot
git config --global user.email [email protected]
- run: |
git config user.email "bot@starship.rs"
git config user.name "Starship Bot"
cd $(brew --repo homebrew/core)
git fetch origin
sudo git reset --hard origin/master
Expand Down Expand Up @@ -218,6 +224,7 @@ jobs:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
Expand All @@ -232,21 +239,20 @@ jobs:
command: build
args: --release --target ${{ matrix.target }}

- name: Prepare build artifacts
- name: Prepare build artifacts [Windows]
if: matrix.os == 'windows-latest'
run: |
if [[ "${{ matrix.os }}" == "windows-latest" ]]
then
strip target/${{ matrix.target }}/release/starship.exe
cd target/${{ matrix.target }}/release
7z a ../../../${{ matrix.name }} starship.exe
else
strip target/${{ matrix.target }}/release/starship
cd target/${{ matrix.target }}/release
tar czvf ../../../${{ matrix.name }} starship
fi
cd -
strip target/${{ matrix.target }}/release/starship.exe
7z a ${{ matrix.name }} target/${{ matrix.target }}/release/starship.exe
- name: Prepare build artifacts [-nix]
if: matrix.os != 'windows-latest'
run: |
strip target/${{ matrix.target }}/release/starship
tar czvf ${{ matrix.name }} target/${{ matrix.target }}/release/starship
- name: Generate release notes
if: matrix.os == 'ubuntu-latest'
run: |
# Temporary fix for https://github.com/actions/setup-go/issues/14
export PATH=$PATH:$(go env GOPATH)/bin
Expand Down

0 comments on commit fbb4b59

Please sign in to comment.