1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-24 21:57:41 +00:00

ci: Fix windows-msvc build failure

Split Windows and -nix asset preparation steps
This commit is contained in:
Matan Kushner 2019-10-20 23:19:40 +09:00
parent 2461b84ed9
commit fbb4b59ca9
No known key found for this signature in database
GPG Key ID: 4B98C3A8949CA8A4

View File

@ -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
@ -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 }}
@ -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
@ -91,6 +95,7 @@ jobs:
# Install all the required dependencies for testing
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
@ -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
@ -170,9 +176,9 @@ jobs:
steps:
- uses: actions/checkout@v1
- run: |
git config --global user.name starship-bot
git config --global user.email bot@starship.rs
- 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
@ -218,6 +224,7 @@ jobs:
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
@ -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