Skip to content

chore: format code

chore: format code #23

Workflow file for this run

name: Nightly Build
on:
push:
paths:
- "**.rs"
- ".github/workflows/nightly.yml"
- "Cross.toml"
- "Dockerfile.nightly"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# https://github.com/Mozilla-Actions/sccache-action#rust-code
RUSTC_WRAPPER: "sccache"
SCCACHE_GHA_ENABLED: "true"
jobs:
build:
name: just build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: rui314/setup-mold@v1
- uses: taiki-e/install-action@just
- uses: mozilla-actions/sccache-action@v0.0.3
- run: just build
- uses: actions/upload-artifact@v4
with:
name: hatsu.x86_64-unknown-linux-gnu
path: target/release/hatsu
retention-days: 30
buildx:
name: just buildx
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: rui314/setup-mold@v1
- uses: taiki-e/install-action@just
- uses: mozilla-actions/sccache-action@v0.0.3
- uses: korandoru/setup-zig@v1
with:
zig-version: master
- run: cargo install cargo-zigbuild
- run: just buildx
- uses: actions/upload-artifact@v4
with:
name: hatsu.aarch64-unknown-linux-gnu
path: target/aarch64-unknown-linux-gnu/release/hatsu
retention-days: 30
docker:
name: docker buildx
runs-on: ubuntu-latest
needs:
- build
- buildx
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: hatsu.x86_64-unknown-linux-gnu
path: target_amd64
- uses: actions/download-artifact@v4
with:
name: hatsu.aarch64-unknown-linux-gnu
path: target_arm64
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile.nightly
platforms: linux/amd64,linux/arm64
push: true
tags: ghcr.io/importantimport/hatsu:nightly