Skip to content

Improve strict sync-eval caching and harden primitive semantics #120

Improve strict sync-eval caching and harden primitive semantics

Improve strict sync-eval caching and harden primitive semantics #120

Workflow file for this run

name: All
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "main" ]
concurrency:
group: "all"
cancel-in-progress: false
jobs:
run:
runs-on: ubuntu-latest
permissions: write-all
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y llvm-dev libclang-dev clang
- name: Install rust
uses: moonrepo/setup-rust@v1
- name: Cache Rust build artifacts
uses: Swatinem/rust-cache@v2
- name: Build project
run: cargo build
- name: Test project
run: cargo test
- name: Setup Pages
if: github.ref == 'refs/heads/main'
uses: actions/configure-pages@v5
- name: Create documents
if: github.ref == 'refs/heads/main'
run: cargo doc --no-deps
- name: Upload documents artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
path: './target/doc/'
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4
- name: Login to Github registry
if: github.ref == 'refs/heads/main'
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Resolve package version
id: version
run: echo "value=$(cargo pkgid | cut -d '@' -f 2)" >> "$GITHUB_OUTPUT"
- name: Setup QEMU
uses: docker/setup-qemu-action@v3
- name: Setup Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image (PR/non-main validation)
if: github.ref != 'refs/heads/main'
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64
push: false
load: false
tags: ghcr.io/${{ github.repository }}/journal-sdk:ci
cache-from: type=gha,scope=journal-sdk-docker
cache-to: type=gha,mode=max,scope=journal-sdk-docker
- name: Build and push multi-arch Docker images
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/${{ github.repository }}/journal-sdk:latest
ghcr.io/${{ github.repository }}/journal-sdk:${{ steps.version.outputs.value }}
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
cache-from: type=gha,scope=journal-sdk-docker
cache-to: type=gha,mode=max,scope=journal-sdk-docker