Merge pull request #11 from 4LT/tcl-tk-license #35
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust | |
on: | |
push: | |
branches: [ "master" ] | |
tags: | |
- "v*" | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Cargo Deny | |
run: cargo install cargo-deny | |
- name: Install Tcl/Tk | |
run: sudo apt-get install tcl-dev tk-dev | |
- name: Deny | |
run: cargo deny --log-level=error check | |
- name: Check | |
run: cargo check --verbose | |
- name: Lint | |
run: cargo clippy -- -Dwarnings | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Windows Toolchain | |
run: rustup target add x86_64-pc-windows-gnu | |
- name: Install Cargo About | |
run: cargo install cargo-about | |
- name: Install MinGW | |
run: sudo apt-get install gcc-mingw-w64-x86-64 | |
- name: Install Tcl Headers | |
run: sudo apt-get install tcl-dev | |
- name: Build Windows Exe | |
run: WARN_FATAL=1 ./cross_windows.sh | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: >- | |
pectin-win64-${{ | |
github.event_name == 'push' && | |
github.ref_name || | |
format('pr{0}', github.event.number) | |
}}-${{ | |
github.sha | |
}} | |
path: scratch/package/pectin.zip | |
compression-level: 0 | |
retention-days: 5 | |
release: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
needs: [ check, build ] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
name: pectin-win64-${{github.ref_name}}-${{github.sha}} | |
- name: Rename | |
run: mv pectin.zip pectin-${{github.ref_name}}-win-x86_64.zip | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "pectin-${{github.ref_name}}-win-x86_64.zip" | |
body: "# Pectin ${{ github.ref_name }}" |