DEV Community

Andy Yang
Andy Yang

Posted on

Release 0.43

The Final

When I still work on the second issue, I found another issue to work with https://github.com/eupn/macrotest/issues/54. This is the pull request I made. https://github.com/eupn/macrotest/pull/57

Migrate from Travis CI to Github Actions

This is a rust project wants move to Github Actions. This is the draft I made.

name: Rust

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  build:

    runs-on: ${{matrix.os}}

    strategy: 
      matrix:
        rust: [stable]
        os: [ubuntu-latest, macos-latest, windows-latest]

    steps:
      - name: Checkout
        uses: actions/checkout@v2

      - name: Use stable rust toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - name: install
        if: matrix.os == 'windows-latest'
        run: |
          rustup target add x86_64-pc-windows-msvc
      - name: before script
        run: |
          rustup toolchain install nightly
          rustup component add rustfmt
          cargo install $TARGET cargo-expand
      - name: script
        run: |
          cargo build $TARGET --verbose --all
          cargo test
          cd test-project
          cargo test -- --nocapture
          cd ../test-procmacro-project
          cargo test -- --nocapture
Enter fullscreen mode Exit fullscreen mode

There are some problems. The author wants a minimal version of rust being tested. When they use export MSRV=1.34.0, but it not working on windows in github action. I am working on something similar to handle this issue. The potential solution could be use set MSRV=1.34.0 in windows.

Top comments (0)