diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 97469fc..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,34 +0,0 @@ -# .github/workflows/release.yml - -on: - release: - types: [created] - -jobs: - release: - name: release ${{ matrix.target }} - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - include: - - target: x86_64-pc-windows-gnu - archive: zip - - target: x86_64-unknown-linux-musl - archive: tar.gz tar.xz tar.zst - - target: x86_64-apple-darwin - archive: zip - steps: - - uses: actions/checkout@master - - name: Install dependencies - run: | - sudo apt-get install build-essential libgtk-3-dev - sudo apt-get install librust-atk-dev - sudo apt-get install libhdf5-serial-dev - - name: Compile and release - uses: rust-build/rust-build.action@v1.4.0 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - RUSTTARGET: ${{ matrix.target }} - ARCHIVE_TYPES: ${{ matrix.archive }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 780f4a9..daafb0a 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,25 +10,55 @@ env: CARGO_TERM_COLOR: always jobs: - build: - + cargo_checks: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: sudo apt-get install -y librust-atk-dev libgtk-3-dev libhdf5-serial-dev + - name: Check package & dependencies for errors + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Run cargo check + uses: actions-rs/cargo@v1 + with: + command: check + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Install dependencies + run: sudo apt-get install -y librust-atk-dev libgtk-3-dev libhdf5-serial-dev + - name: Check package & dependencies for errors + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Run cargo clippy + uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D warnings + + tests: runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install dependencies - run: | - sudo apt-get install build-essential libgtk-3-dev - sudo apt-get install librust-atk-dev - sudo apt-get install libhdf5-serial-dev - rustup component add clippy - - name: Check package & dependencies for errors - run: cargo check - - name: Lint - run: | - cargo fmt -- --check - cargo clippy -- -D warnings - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v3 + - name: Install dependencies + run: sudo apt-get install -y librust-atk-dev libgtk-3-dev libhdf5-serial-dev + - name: Check package & dependencies for errors + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + - name: Run cargo test + uses: actions-rs/cargo@v1 + with: + command: test