new #5
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: CI/CD | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Install Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Check | |
run: make check | |
- name: Format | |
run: make format | |
- name: Test | |
run: make test | |
- name: Release | |
run: cargo build --release | |
- name : Make folder | |
run : mkdir -p data | |
- name : Send binary data to data folder | |
run : cp target/release/Mini_PJT_7_Rust_ISL ./data/ | |
- name: Upload Binary Artifact | |
uses: actions/upload-artifact@v4 #v3 is scheduled for deprecation Nov 30 2024 check marketplace | |
with: | |
name: Mini_PJT_7_Rust_ISL | |
path: data/Mini_PJT_7_Rust_ISL | |
# from John | |
# name: CI | |
# on: | |
# push: | |
# branches: | |
# - main | |
# pull_request: | |
# branches: | |
# - main | |
# jobs: | |
# build: | |
# runs-on: ubuntu-latest | |
# env: | |
# WORKING_DIR: sqlite #change this to the rust project name you are developing. | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v3 | |
# - name: Install Rust | |
# uses: actions-rs/toolchain@v1 | |
# with: | |
# toolchain: stable | |
# override: true | |
# - name: Check | |
# run: cargo check | |
# working-directory: ${{ env.WORKING_DIR }} | |
# - name: Format | |
# run: cargo fmt | |
# working-directory: ${{ env.WORKING_DIR }} | |
# - name: Test | |
# run: cargo test | |
# working-directory: ${{ env.WORKING_DIR }} | |
# - name: Release | |
# run: cargo build --release | |
# working-directory: ${{ env.WORKING_DIR }} | |
# - name: Upload Binary Artifact | |
# uses: actions/upload-artifact@v4 #v3 is scheduled for deprecation Nov 30 2024 check marketplace | |
# with: | |
# name: RuSQLite CLI Binary | |
# path: ${{ env.WORKING_DIR }}/target/release/sqlite #change the /add to the name of your binary |