Skip to content

Commit

Permalink
ci: enabled windows builds now that termion is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
eras committed Jan 1, 2023
1 parent 032c55a commit c211f8c
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 53 deletions.
7 changes: 5 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ jobs:
needs: notify_start
strategy:
matrix:
os: [ubuntu-latest]
# windows-latest not supported due to termion
os: [ubuntu-latest, windows-latest]
# macos-latest removed as it segfaults
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -46,6 +45,10 @@ jobs:
run: 'cargo test'
- name: Build
run: 'cargo build --locked'
if: ${{ matrix.os != 'windows-latest' }}
- name: Build
run: 'cargo build' # difficult to create proper lock file for Windows outside ci
if: ${{ matrix.os == 'windows-latest' }}
- uses: actions/upload-artifact@v2
with:
name: mxrxtx-${{ runner.os }}
Expand Down
101 changes: 50 additions & 51 deletions .github/workflows/tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ jobs:
contents: write
strategy:
matrix:
os: [ubuntu-latest]
os: [ubuntu-latest, windows-latest]
# macos-latest crashes
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -106,56 +106,55 @@ jobs:
asset_name: mxrxtx-${{ needs.create_release.outputs.git_describe }}-${{ runner.os }}.bin
asset_content_type: application/octet-stream
if: ${{ matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest' }}
# not supported now due to termion
# windows:
# name: mxrxtx
# needs: create_release
# permissions:
# issues: write
# pull-requests: write
# contents: write
# strategy:
# matrix:
# os: [windows-latest]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v2
# with:
# submodules: true
# # https://stackoverflow.com/a/58178121
# - uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# - uses: actions/cache@v2
# with:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# target/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# - name: build
# env:
# GIT_DESCRIBE: ${{ needs.create_release.outputs.git_describe }}
# run: 'cargo build --release'
# - uses: actions/upload-artifact@v2
# with:
# name: mxrxtx
# path: |
# target/release/mxrxtx.exe
# Cargo.lock
# # https://github.com/actions/upload-release-asset
# - name: Upload Release Asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# # https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# upload_url: ${{ needs.create_release.outputs.upload_url }}
# asset_path: ./target/release/mxrxtx.exe
# asset_name: mxrxtx-${{ needs.create_release.outputs.git_describe }}-${{ runner.os }}.exe
# asset_content_type: application/octet-stream
windows:
name: mxrxtx
needs: create_release
permissions:
issues: write
pull-requests: write
contents: write
strategy:
matrix:
os: [windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: true
# https://stackoverflow.com/a/58178121
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: build
env:
GIT_DESCRIBE: ${{ needs.create_release.outputs.git_describe }}
run: 'cargo build --release'
- uses: actions/upload-artifact@v2
with:
name: mxrxtx
path: |
target/release/mxrxtx.exe
Cargo.lock
# https://github.com/actions/upload-release-asset
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
# https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./target/release/mxrxtx.exe
asset_name: mxrxtx-${{ needs.create_release.outputs.git_describe }}-${{ runner.os }}.exe
asset_content_type: application/octet-stream
notify_end_success:
runs-on: ubuntu-latest
needs: [create_release, unix]
Expand Down

0 comments on commit c211f8c

Please sign in to comment.