build on windows and macos #14
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: ["main"] | |
pull_request: | |
branches: ["main"] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Run tests | |
run: cargo test --verbose | |
- name: Build | |
run: cargo build --verbose --release | |
- name: copy build artifact to zip file | |
shell: powershell | |
working-directory: ${{ github.workspace }} | |
run: | | |
cp .\target\release\timeline.dll .\timeline\timeline.dll | |
Compress-Archive .\timeline\ timeline.zip -u | |
- name: Upload Archive | |
uses: actions/upload-artifact@v3 | |
with: | |
name: timeline-win | |
path: timeline.zip | |
compression-level: 0 | |
build-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Build | |
run: cargo build --verbose | |
- name: Run tests | |
run: cargo test --verbose |