Skip to content

Commit

Permalink
chore: remove codegen output from repo (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
scarmuega authored Feb 8, 2024
1 parent 5392b45 commit 6fe14c9
Show file tree
Hide file tree
Showing 62 changed files with 30 additions and 59,678 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/build-haskell.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
name: "Build Haskell Package"

on:
workflow_call:
inputs:
codegen-artifact:
required: true
type: string
workflow_call: {}

jobs:
build:
Expand All @@ -27,7 +23,7 @@ jobs:
id: download-haskell-codegen
uses: actions/download-artifact@v4
with:
name: ${{ inputs.codegen-artifact }}
name: codegen

- name: Setup Haskell
id: setup-hs
Expand All @@ -45,7 +41,9 @@ jobs:
uses: actions/cache/restore@v4
id: cache-cabal-build
env:
key: ${{ runner.os }}-ghc-${{ steps.setup-hs.outputs.ghc-version }}-cabal-${{ steps.setup-hs.outputs.cabal-version }}
key:
${{ runner.os }}-ghc-${{ steps.setup-hs.outputs.ghc-version
}}-cabal-${{ steps.setup-hs.outputs.cabal-version }}
with:
path: ${{ steps.setup-hs.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
Expand Down
19 changes: 0 additions & 19 deletions .github/workflows/generate-and-build.yml

This file was deleted.

28 changes: 12 additions & 16 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: "Run Buf Code Generation"

on:
workflow_call:
inputs:
codegen-artifact:
required: true
type: string
workflow_dispatch: {}
workflow_call: {}

jobs:
codegen:
Expand All @@ -28,9 +25,11 @@ jobs:
with:
node-version: 20.11.0
cache: "npm"
cache-dependency-path: "buf.gen.yaml"

- name: Add node_modules to PATH
run: echo "$(pwd)/node_modules/.bin" >> "$GITHUB_PATH"
- name: Install node protoc plugins
run: |
npm install -g @bufbuild/protoc-gen-es @connectrpc/protoc-gen-connect-es
- name: Install Prost from Cargo
uses: baptiste0928/cargo-install@v2
Expand All @@ -52,11 +51,6 @@ jobs:
with:
crate: protoc-gen-tonic

- name: Install Protoc Plugins from npm
run: |
npm install @connectrpc/protoc-gen-connect-es
npm install @bufbuild/protoc-gen-es
- name: Setup Haskell
id: setup-hs
uses: haskell-actions/setup@v2
Expand All @@ -73,7 +67,9 @@ jobs:
uses: actions/cache/restore@v4
id: cache-cabal-build
env:
key: ${{ runner.os }}-ghc-${{ steps.setup-hs.outputs.ghc-version }}-cabal-${{ steps.setup-hs.outputs.cabal-version }}
key:
${{ runner.os }}-ghc-${{ steps.setup-hs.outputs.ghc-version
}}-cabal-${{ steps.setup-hs.outputs.cabal-version }}
with:
path: ${{ steps.setup-hs.outputs.cabal-store }}
key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }}
Expand All @@ -84,15 +80,15 @@ jobs:
run: cabal install proto-lens-protoc-0.8.0.0

- name: Install Buf from npm
run: npm install @bufbuild/buf
run: npm install -g @bufbuild/buf

- name: Generate code
run: buf generate
run: buf generate proto

- name: Create codegen artifact
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.codegen-artifact }}
name: codegen
path: "gen/**"

- name: Cache Cabal
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: "Generate and build Haskell"

on:
push:
tags: v*

jobs:
generate:
uses: ./.github/workflows/generate.yml

build-haskell:
needs: [generate]
uses: ./.github/workflows/build-haskell.yml
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 6fe14c9

Please sign in to comment.