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

feat/ci.yml #49

Closed
wants to merge 14 commits into from
Closed
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
31 changes: 15 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,8 @@ jobs:
name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
steps:
- name: "Setup actions/checkout"
uses: actions/checkout@v4

# setup ubuntu dependencies
- name: Setup Ubuntu dependencies
- name: "Setup Ubuntu dependencies"
if: matrix.runner == 'ubuntu-20.04'
run: |
sudo apt-get update
Expand All @@ -47,30 +44,32 @@ jobs:
run: |
brew update
brew install llvm@17
echo "$(brew --prefix llvm@17)/bin" >> $GITHUB_PATH
echo "$$(brew --prefix llvm@17)/bin" >> $GITHUB_PATH

- name: Install Node.js
- name: "Install Node.js"
uses: actions/setup-node@v3
with:
node-version: 18

- name: "Install pnpm"
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: "Setup rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt

- name: Add rust target (macOS)
if: ${{ matrix.runner == 'macos-latest' }}
- name: "Add rust target (macOS)"
if: matrix.runner == 'macos-latest'
run: rustup target add aarch64-apple-darwin

- name: Add rust target (Other)
if: ${{ matrix.runner != 'macos-latest' }}
- name: "Add rust target (Other)"
if: matrix.runner != 'macos-latest'
run: rustup target add ${{ matrix.target }}

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: Install GUI frontend dependencies
run: cd edgen && pnpm install # change this to npm or pnpm depending on which one you use

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "CI"
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]

jobs:
ci:
name: CI
runs-on: ubuntu-20.04
steps:
- name: "Setup actions/checkout"
uses: actions/checkout@v4

# setup ubuntu dependencies
- name: "Setup Ubuntu dependencies"
run: |
sudo apt-get update
sudo apt-get install -y build-essential curl wget file libssl-dev libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev patchelf

- name: "Install Node.js"
uses: actions/setup-node@v3
with:
node-version: 18

- name: "Install pnpm"
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false

- name: "Setup rust"
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt

- name: "Add rust target"
run: rustup target add x86_64-unknown-linux-gnu

- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
57 changes: 57 additions & 0 deletions .github/workflows/setup-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# name: "Setup"
# description: "Setup environment for CI"
# inputs:
# runner:
# description: "The runner for the setup"
# required: true
# type: string
# target:
# description: "The target for Rust"
# required: true
# type: string

# runs:
# using: "composite"
# steps:
# # setup ubuntu dependencies
# - name: "Setup Ubuntu dependencies"
# if: inputs.runner == 'ubuntu-20.04'
# run: |
# sudo apt-get update
# sudo apt-get install -y build-essential curl wget file libssl-dev libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev patchelf
# shell: bash

# # install llvm (for llvm-copy) on macos only. For cpp runtimes.
# - name: "Setup MacOS dependencies"
# if: inputs.runner == 'macos-latest'
# run: |
# brew update
# brew install llvm@17
# echo "$$(brew --prefix llvm@17)/bin" >> $GITHUB_PATH
# shell: bash

# - name: "Install Node.js"
# uses: actions/setup-node@v3
# with:
# node-version: 18

# - name: "Install pnpm"
# uses: pnpm/action-setup@v2
# with:
# version: 8
# run_install: false

# - name: "Setup rust"
# uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# components: rustfmt

# - name: "Add rust target (macOS)"
# if: inputs.runner == 'macos-latest'
# run: rustup target add aarch64-apple-darwin
# shell: bash

# - name: "Add rust target (Other)"
# if: inputs.runner != 'macos-latest'
# run: rustup target add ${{ inputs.target }}
# shell: bash
Loading