Skip to content

Commit

Permalink
Refactor GH action workflows (#874)
Browse files Browse the repository at this point in the history
* Remove unused build workflow

* Update deploy docs workflow

* Add separate workflow for linting FFI bindings

* Update node bindings lint workflow

* Update workspace lint workflow

* Update node bindings test workflow

* Add separate test workflow for FFI bindings

* Update workspace test workflow

* Update node bindings release workflow

* Update swift bindings release workflow

* Update kotlin bindings release workflow

* Remove unused release workflow

* Update validation server deploy workflow

* Upgrade lint workflow machines

* Update install command for musl-tools

* Update CLI release workflow

* Add noop workflow

* Include rustfmt.toml for lint steps

* Update noop path filtering

* Fix workspace format check command

* Fix lint issue in FFI bindings

* Add caching to doc deploy workflow

* Whitespace and comment updates

* Update workspace test command

* Install foundry for workspace tests

* Update noop workflow
  • Loading branch information
rygine authored Jun 28, 2024
1 parent feb4864 commit e61585a
Show file tree
Hide file tree
Showing 17 changed files with 420 additions and 567 deletions.
221 changes: 0 additions & 221 deletions .github/workflows/build.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
name: GitHub Pages
name: Deploy Docs to GitHub Pages

on:
push:
branches: ["main"]
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -22,26 +24,28 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

- name: Setup Pages
uses: actions/configure-pages@v2

- name: Install rust
uses: actions-rs/toolchain@v1
- name: Update rust toolchains
run: rustup update

- name: Cache
uses: Swatinem/rust-cache@v2
with:
toolchain: stable
profile: minimal
override: true
workspaces: |
.
- name: Invoke cargo doc
run: ./dev/docs
id: docgen

- name: Upload artifact
uses: actions/upload-pages-artifact@v2
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v3

# Deployment job
deploy:
Expand All @@ -53,4 +57,4 @@ jobs:
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v3
uses: actions/deploy-pages@v4
Original file line number Diff line number Diff line change
@@ -1,36 +1,38 @@
name: Publish Validation Service Image
name: Deploy Validation Service Image

on:
push:
branches:
- main

workflow_dispatch:

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
name: Push Docker Image to GitHub Packages
runs-on: warp-ubuntu-latest-x64-16x
permissions:
contents: read
packages: write
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v4

- name: Log in to the Container registry
uses: docker/login-action@v1
- name: Log in to the container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
uses: docker/metadata-action@v5
with:
images: ghcr.io/xmtp/mls-validation-service

- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
id: push
with:
context: .
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/lint-ffi-bindings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Lint FFI Bindings

on:
push:
branches:
- main

pull_request:
paths:
- "bindings_ffi/**"
- ".github/workflows/lint-ffi-bindings.yaml"
- "rustfmt.toml"

jobs:
lint:
name: Lint
runs-on: warp-ubuntu-latest-x64-16x
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Update rust toolchains
run: rustup update

- name: Cache
uses: Swatinem/rust-cache@v2
with:
workspaces: |
.
bindings_ffi
- name: Run clippy and fail on warnings
run: cargo clippy --manifest-path bindings_ffi/Cargo.toml --all-features --all-targets --no-deps -- -Dwarnings

- name: Run format check
run: cargo fmt --manifest-path bindings_ffi/Cargo.toml --check
Loading

0 comments on commit e61585a

Please sign in to comment.