Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@
# For building branelet and stuff for M1 macs on Linux:
[target.aarch64-unknown-linux-musl]
linker = "aarch64-linux-musl-gcc"

[alias]
xtask = "run --package xtask --"
125 changes: 125 additions & 0 deletions .github/workflows/nightly_release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: Create the nightly release
on:
schedule:
# Take into account lut99's sleep schedule
- cron: 0 4 * * *

# Manual mechanism to bump the nightly in case of a issue with the one from last night
workflow_dispatch:
inputs:
ref:
default: main
required: false
type: string

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
GH_TOKEN: ${{ github.token }}

jobs:
tag:
name: "Add nightly tag"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ inputs.ref || 'main' }}
fetch-tags: true
- name: Check if there is anything to be done
run: |
[[ $(git rev-parse HEAD) != $(git rev-parse nightly) ]]
- name: Tag the latest commit
run: |
git config user.name "Brane"
git config user.email "brane@nonexistentemail.com"
git push --delete origin nightly || true
git tag -a nightly -m "Nightly release"
git push --tags

build:
name: "Build & package"
needs: tag
strategy:
fail-fast: false
matrix:
include:
- runner: ubuntu-latest
os: linux
arch: x86_64
- runner: macos-latest
os: macos
arch: aarch64
- runner: windows-latest
os: windows
arch: x86_64
- runner: ubuntu-24.04-arm
os: linux
arch: aarch64
- runner: macos-13
os: macos
arch: x86_64

runs-on: ${{ matrix.runner }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: nightly
fetch-tags: true
- name: Set up Docker Buildx
if: ${{ matrix.os == 'linux' }}
uses: docker/setup-buildx-action@v3
- name: Install Go
if: ${{ matrix.os == 'macos' }}
uses: actions/setup-go@v5
with:
go-version: '^1.23.4'
- name: Update package version in Cargo.toml
run: |
cargo run --release --no-default-features --package xtask set-version -p nightly -m '$git_hash$git_dirty'
- name: Build
run: |
cargo run --release --no-default-features --package xtask build all
- name: Package
run: |
cargo run --release --no-default-features --package xtask package github
- name: Upload
uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}-${{ matrix.arch }}-nightly
path: |
target/package/release/*
if-no-files-found: error
retention-days: 1

release:
name: "Release artifacts to GitHub"
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
# without further specification, downloads all artifacts from the run
with:
path: release
merge-multiple: true
- name: Delete previous nightly release
run: gh -R $GITHUB_REPOSITORY release delete nightly
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
release/*
fail_on_unmatched_files: true
tag_name: nightly
name: Nightly
prerelease: true
body: This is the nightly (daily) release of Brane. This build can occasionally break. Do not use in production.
draft: false
make_latest: false
53 changes: 53 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ members = [

# # TODO
# "brane-log",

"xtask",
]


Expand All @@ -67,7 +69,7 @@ license = "Apache-2.0"
# Lut99 Crates
humanlog = { git = "https://github.com/Lut99/humanlog-rs", tag = "v0.2.0" }
enum-debug = { git = "https://github.com/Lut99/enum-debug", tag = "v1.1.0", features = ["derive"] }
error-trace = { git = "https://github.com/Lut99/error-trace-rs", tag = "v3.0.0" }
error-trace = { git = "https://github.com/Lut99/error-trace-rs", tag = "v3.3.1" }
transform = { git = "https://github.com/Lut99/transform-rs", tag = "v0.2.0" }
names = { git = "https://github.com/Lut99/names-rs", tag = "v0.1.0", default-features = false, features = [ "rand", "three-lowercase" ]}
download = { git = "https://github.com/Lut99/download-rs", tag = "v0.1.0", default-features = false, features = ["download"] }
Expand Down
5 changes: 0 additions & 5 deletions Dockerfile.mac

This file was deleted.

1 change: 0 additions & 1 deletion brane-api/src/cli.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
//! This module contains all logic and structures with respect to argument handling and invocation of this command
use std::path::PathBuf;

use clap::Parser;
Expand Down
5 changes: 0 additions & 5 deletions brane-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ license.workspace = true
name = "brane"
path = "src/main.rs"

[[bin]]
name = "brane-completions"
path = "src/completions.rs"
doc = false

[dependencies]
anyhow = "1.0.66"
async-trait = "0.1.67"
Expand Down
17 changes: 0 additions & 17 deletions brane-cli/src/completions.rs

This file was deleted.

5 changes: 0 additions & 5 deletions brane-ctl/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ license.workspace = true
name = "branectl"
path = "src/main.rs"

[[bin]]
name = "branectl-completions"
path = "src/completions.rs"
doc = false

[dependencies]
base64ct = "1.6.0"
bollard = "0.18.0"
Expand Down
18 changes: 0 additions & 18 deletions brane-ctl/src/completions.rs

This file was deleted.

Loading
Loading