Skip to content

refactor: split openapi crate #45

refactor: split openapi crate

refactor: split openapi crate #45

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:
if: github.ref == 'refs/heads/main'
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
command: _build
musl: false
- target: x86_64-unknown-linux-musl
command: _build
musl: true
- target: aarch64-unknown-linux-gnu
command: _zigbuild
musl: false
- target: aarch64-unknown-linux-musl
command: _zigbuild
musl: true
name: build ${{ matrix.target }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@just
- uses: mozilla-actions/sccache-action@v0.0.3
- if: matrix.command == '_zigbuild'
uses: korandoru/setup-zig@v1
with:
zig-version: master
- if: matrix.musl == true
run: sudo apt update && sudo apt install -y musl-tools && sudo ln -s /bin/g++ /bin/musl-g++
- run: just ${{ matrix.command }} ${{ matrix.target }}
- uses: actions/upload-artifact@v4
with:
name: hatsu.${{ matrix.target }}
path: target/${{ matrix.target }}/release/hatsu
if-no-files-found: error
retention-days: 30
docker:
name: docker buildx
runs-on: ubuntu-latest
needs:
- build
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