-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from extism/add-ci
chore: add ci
- Loading branch information
Showing
2 changed files
with
80 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
on: [workflow_call] | ||
|
||
name: libextism | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: extism/extism | ||
path: runtime | ||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
- name: Cache Rust environment | ||
uses: Swatinem/rust-cache@v1 | ||
- name: Cache libextism | ||
id: cache-libextism | ||
uses: actions/cache@v3 | ||
with: | ||
path: runtime/target/** | ||
key: ${{ runner.os }}-libextism-${{ hashFiles('runtime/**') }} | ||
- name: Build | ||
if: steps.cache-libextism.outputs.cache-hit != 'true' | ||
shell: bash | ||
run: | | ||
cd runtime | ||
cargo build --release -p libextism | ||
- name: Install extism shared library | ||
shell: bash | ||
run: | | ||
cd runtime | ||
sudo make install |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
on: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
name: Haskell CI | ||
|
||
jobs: | ||
test: | ||
name: Haskell | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v3 | ||
- uses: ./.github/actions/libextism | ||
- name: Setup Haskell env | ||
uses: haskell/actions/setup@v2 | ||
with: | ||
enable-stack: false | ||
- name: 'Set up HLint' | ||
uses: haskell/actions/hlint-setup@v2 | ||
- name: Build Haskell Host SDK | ||
run: | | ||
uname -a | ||
cabal update | ||
cabal build | ||
- name: Test Haskell SDK | ||
run: | | ||
LD_LIBRARY_PATH=/usr/local/lib cabal test | ||
- name: 'Run HLint' | ||
uses: haskell/actions/hlint-run@v2 | ||
with: | ||
path: src/ | ||
fail-on: warning | ||
|
||
- name: 'Run HLint' | ||
uses: haskell/actions/hlint-run@v2 | ||
with: | ||
path: manifest/ | ||
fail-on: warning |