Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build on windows and macos #4

Merged
merged 14 commits into from
Feb 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/releases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release

on:
workflow_dispatch:

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-x86_64
path: timeline.zip
compression-level: 0

build-macos:
runs-on: macos-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
working-directory: ${{ github.workspace }}
run: |
cp ./target/release/libtimeline.dylib ./timeline/libtimeline.dylib
zip -r timeline.zip ./timeline
- name: Upload Archive
uses: actions/upload-artifact@v3
with:
name: timeline-macos-x86_64
path: timeline.zip
compression-level: 0

do-release:
runs-on: ubuntu-latest
needs: [build-windows, build-macos]
steps:
- name: Download Windows Build
uses: actions/download-artifact@v3
with:
name: timeline-win-x86_64
path: timeline-win-x86_64.zip
- name: Download MacOS Build
uses: actions/download-artifact@v3
with:
name: timeline-macos-x86_64
path: timeline-macos-x86_64.zip
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
timeline-macos-x86_64.zip
timeline-win-x86_64.zip
23 changes: 13 additions & 10 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: Run tests
run: cargo test --verbose

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v3
- name: Run tests
run: cargo test --verbose
Binary file removed timeline.zip
Binary file not shown.
Loading