Skip to content

Commit

Permalink
🦋 initial commit
Browse files Browse the repository at this point in the history
Co-authored-by: Aaron Turon <aturon@fastly.com>
Co-authored-by: Tanya L. Crenshaw <tcrenshaw@fastly.com>
Co-authored-by: Pat Hickey <pat@moreproductive.org>
Co-authored-by: Michael Gattozzi <mgattozzi@fastly.com>
Co-authored-by: Dan Kegel <dkegel@fastly.com>
  • Loading branch information
6 people committed Jul 8, 2021
0 parents commit f44257f
Show file tree
Hide file tree
Showing 80 changed files with 12,824 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Main

on:
push:
tags:
- 'v*.*.*'

jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Install latest Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true

- name: Build
run: cargo build --all --release && strip target/release/viceroy && mv target/release/viceroy target/release/viceroy_linux-amd64

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
target/release/viceroy_linux-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-win:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Install latest Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true

- name: Build
run: |
cargo build --all --release
ren target\release\viceroy.exe viceroy_windows-amd64.exe
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
target/release/viceroy_windows-amd64.exe
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

build-mac:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Install latest Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
default: true
override: true

- name: Build
run: cargo build --all --release && strip target/release/viceroy && mv target/release/viceroy target/release/viceroy_darwin-amd64

- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
target/release/viceroy_darwin-amd64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63 changes: 63 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
on: pull_request
name: Test
jobs:
test:
strategy:
matrix:
rust-toolchain: [1.52.1]
platform: [ubuntu-latest]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
- name: Add wasm32-wasi Rust target
run: rustup target add wasm32-wasi
- name: Cache cargo registry
uses: actions/cache@v1
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v1
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v1
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Install rustfmt
run: rustup component add rustfmt
shell: bash
- name: Check formatting
run: cargo fmt --all -- --check
shell: bash
- name: test
run: make ci
shell: bash

package-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
submodules: true

- name: Install latest Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
default: true
override: true

- name: Check crates can be published
run: make package-check
shell: bash
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
**/target/
publish
verify-publishable/
.vscode
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "lib/compute-at-edge-abi"]
path = lib/compute-at-edge-abi
url = git@github.com:fastly/compute-at-edge-abi.git
Loading

0 comments on commit f44257f

Please sign in to comment.