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

Added GitHub Actions Workflows CI_CD #32 #38

Merged
merged 9 commits into from
Jul 14, 2023
Merged
Changes from 4 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
57 changes: 57 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Build and Test

on:
pull_request:
branches:
- '*'
types:
- opened
- synchronize
push:
branches:
- master

jobs:
test:
runs-on: ubuntu-latest
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux? Since its a program for Microsoft Windows, does a build on linux produce a windows exe?


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

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Run tests and clippy
run: |
cargo clippy
cargo test

build:
needs: [test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event_name == 'push'

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

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable

- name: Build program
run: cargo build --release

- name: Create zip file
run: |
zip -r program.zip target/release

- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: program-zip
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the program right now is called grout-wm, maybe the zip-file should be called grout-wm.zip? Also, would it be possible to get the version number from Cargo.toml? So the file would be grout-wm-version.zip?

path: program.zip