Skip to content

Commit

Permalink
get closer
Browse files Browse the repository at this point in the history
  • Loading branch information
tztz8 committed May 31, 2023
1 parent e1b0645 commit ce67b2f
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 24 deletions.
37 changes: 19 additions & 18 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ permissions:
jobs:
build:

runs-on: ubuntu-latest
# runs-on: ubuntu-latest
runs-on: self-hosted
timeout-minutes: 40
# NOTE already has rust
# NOTE already has openssl
Expand All @@ -25,25 +26,25 @@ jobs:
# TODO: Does Cache work?
# https://docs.github.com/en/actions/using-workflows/caching-dependencies-to-speed-up-workflows
# https://github.com/marketplace/actions/cache
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
studentpage/target/
adminpage/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# - uses: actions/cache@v3
# with:
# path: |
# ~/.cargo/bin/
# ~/.cargo/registry/index/
# ~/.cargo/registry/cache/
# ~/.cargo/git/db/
# target/
# studentpage/target/
# adminpage/target/
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

# Takes around 8min's
- name: Update local toolchain (takes around 8 mins)
run: |
rustup update
rustup component add clippy
rustup target add wasm32-unknown-unknown
if ! command -v trunk &> /dev/null ; then cargo install --locked trunk; fi
# - name: Update local toolchain (takes around 8 mins)
# run: |
# rustup update
# rustup component add clippy
# rustup target add wasm32-unknown-unknown
# if ! command -v trunk &> /dev/null ; then cargo install --locked trunk; fi

- name: Toolchain info
run: |
Expand Down
4 changes: 4 additions & 0 deletions helper_scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ Install
### TODO: Need

- [ ] Install libs (`openssl`)
```shell
sudo dnf update
sudo dnf install openssl mariadb-connector-c
```
- [ ] Setup server user (`status-reports`)
- [ ] Copy server into user (`/home/status-reports/server`)
- [ ] Copy SSL cert into user (`/home/status-reports/server`)
Expand Down
16 changes: 10 additions & 6 deletions helper_scripts/dev_rust_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,20 @@ Purple='\033[0;35m' # Purple
echo -e "$Cyan Updating System... $Color_Off"
sudo dnf update
sudo dnf upgrade -y
echo -e "$Cyan Install Development Tools, openssl-devel, mariadb-connector-c ... $Color_Off"
echo -e "$Cyan Install Development Tools, openssl/dev, mariadb-connector-c/dev ... $Color_Off"
sudo dnf groupinstall 'Development Tools'
sudo dnf install openssl-devel mariadb-connector-c
# mariadb-connector-c gives the mysql client lib
sudo dnf install openssl openssl-devel mariadb-connector-c mariadb-connector-c-devel
# get rustup
echo -e "$Cyan Install rustup ... $Color_Off"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# TODO: run src
echo -e "$Cyan Install clippy, wasm, trunk ... $Color_Off"
source "$HOME/.cargo/env"
echo -e "$Cyan Install clippy, wasm ... $Color_Off"
rustup component add clippy
rustup target add wasm32-unknown-unknown
echo -e "$Cyan Install trunk ... $Color_Off"
cargo install --locked trunk
echo -e "$Cyan TODO: Install db ... $Color_Off"
# TODO: install db
echo -e "$Cyan Install db ... $Color_Off"
cargo install diesel_cli --no-default-features --features mysql
echo -e "$Cyan Getting project ... $Color_Off"
git clone https://github.com/tztz8/EWU-CSCD488-490-Senior-Project.git

0 comments on commit ce67b2f

Please sign in to comment.