Skip to content

Commit 2098506

Browse files
committed
Refactor CD workflow to use reusable workflow, change license from MIT/Apache-2.0 dual to FSL-1.1-ALv2, and enable reqwest features in dependencies
- Replace custom CD workflow with reusable qntx/workflows rust-cd.yml workflow - Remove LICENSE-MIT and LICENSE-APACHE files - Add new LICENSE file with Functional Source License 1.1 (Apache-2.0 Future License) - Update README.md to reflect FSL-1.1-ALv2 licensing with 2-year conversion to Apache-2.0 - Enable "reqwest" feature in alloy dependency - Enable
1 parent 610f8c0 commit 2098506

19 files changed

Lines changed: 547 additions & 496 deletions

File tree

.github/workflows/cd.yml

Lines changed: 5 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -8,107 +8,9 @@ on:
88
permissions:
99
contents: write
1010

11-
env:
12-
CARGO_TERM_COLOR: always
13-
1411
jobs:
15-
build:
16-
strategy:
17-
fail-fast: false
18-
matrix:
19-
include:
20-
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
21-
- {
22-
target: aarch64-unknown-linux-gnu,
23-
os: ubuntu-latest,
24-
cross: true,
25-
}
26-
- { target: aarch64-apple-darwin, os: macos-latest }
27-
- { target: x86_64-pc-windows-msvc, os: windows-latest }
28-
- { target: aarch64-pc-windows-msvc, os: windows-latest }
29-
30-
runs-on: ${{ matrix.os }}
31-
32-
steps:
33-
- uses: actions/checkout@v6
34-
- uses: dtolnay/rust-toolchain@stable
35-
with: { targets: "${{ matrix.target }}" }
36-
- uses: Swatinem/rust-cache@v2
37-
with: { key: "${{ matrix.target }}" }
38-
39-
# Cross-compile for Linux ARM64 on the x86_64 runner.
40-
# The Azure apt mirror lacks arm64 packages (actions/runner-images#10901),
41-
# so we add ports.ubuntu.com as a separate deb822 source.
42-
- name: Setup cross-compilation (Linux ARM64)
43-
if: matrix.cross
44-
run: |
45-
sudo sed -i '/^Types:/a Architectures: amd64' /etc/apt/sources.list.d/ubuntu.sources
46-
printf '%s\n' \
47-
"Types: deb" \
48-
"URIs: http://ports.ubuntu.com/ubuntu-ports/" \
49-
"Suites: noble noble-updates noble-security" \
50-
"Components: main restricted universe multiverse" \
51-
"Architectures: arm64" \
52-
"Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg" \
53-
| sudo tee /etc/apt/sources.list.d/arm64-cross.sources
54-
sudo dpkg --add-architecture arm64
55-
sudo apt-get update
56-
sudo apt-get install -y gcc-aarch64-linux-gnu
57-
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> "$GITHUB_ENV"
58-
59-
- run: cargo build --release --target ${{ matrix.target }} -p machi-auto
60-
61-
- name: Package
62-
shell: bash
63-
run: |
64-
ver="${GITHUB_REF_NAME#v}"
65-
[[ "$GITHUB_REF_NAME" == v* ]] || ver="0.0.0-dev"
66-
target="${{ matrix.target }}"
67-
staging="machi-$ver-$target"
68-
bin="machi"; [[ "$target" == *windows* ]] && bin="$bin.exe"
69-
70-
mkdir "$staging"
71-
cp "target/$target/release/$bin" LICENSE-MIT LICENSE-APACHE "$staging/"
72-
73-
if [[ "$target" == *windows* ]]; then
74-
(cd "$staging" && 7z a "../$staging.zip" .)
75-
asset="$staging.zip"
76-
else
77-
tar czf "$staging.tar.gz" -C "$staging" .
78-
asset="$staging.tar.gz"
79-
fi
80-
81-
# SHA-256 checksum
82-
if command -v sha256sum &>/dev/null; then sha256sum "$asset" > "$asset.sha256"
83-
else shasum -a 256 "$asset" > "$asset.sha256"; fi
84-
85-
- uses: actions/upload-artifact@v6
86-
with:
87-
name: dist-${{ matrix.target }}
88-
path: |
89-
machi-*.*
90-
!machi-*/
91-
92-
release:
93-
needs: build
94-
runs-on: ubuntu-latest
95-
if: startsWith(github.ref, 'refs/tags/v')
96-
steps:
97-
- uses: actions/checkout@v6
98-
with: { fetch-depth: 0 }
99-
100-
- uses: actions/download-artifact@v7
101-
with: { merge-multiple: true }
102-
103-
- name: Generate changelog
104-
id: cliff
105-
uses: orhun/git-cliff-action@v4
106-
with: { args: "--latest --strip header" }
107-
108-
- uses: softprops/action-gh-release@v2
109-
with:
110-
body: ${{ steps.cliff.outputs.content }}
111-
files: |
112-
machi-*.tar.gz
113-
machi-*.zip
114-
machi-*.sha256
12+
call-cd:
13+
uses: qntx/workflows/.github/workflows/rust-cd.yml@main
14+
with:
15+
bin: machi
16+
package: machi-auto

Cargo.lock

Lines changed: 50 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ alloy = { version = "1", default-features = false, features = [
2121
"signers",
2222
"signer-local",
2323
"provider-http",
24+
"reqwest",
2425
"network",
2526
"consensus",
2627
"sol-types",
@@ -43,7 +44,7 @@ quote = "1.0"
4344
ra2a = "0.8"
4445
regex = "1.11"
4546
reqwest = { version = "0.13.1", features = ["json", "stream", "multipart"] }
46-
reqwest-middleware = "0.5"
47+
reqwest-middleware = { version = "0.5", features = ["json", "multipart"] }
4748
rmcp = { version = "0.16", features = [
4849
"client",
4950
"transport-child-process",

LICENSE

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,105 @@
1+
# Functional Source License, Version 1.1, ALv2 Future License
2+
3+
## Abbreviation
4+
5+
FSL-1.1-ALv2
6+
7+
## Notice
8+
9+
Copyright $2026 $qntx
10+
11+
## Terms and Conditions
12+
13+
### Licensor ("We")
14+
15+
The party offering the Software under these Terms and Conditions.
16+
17+
### The Software
18+
19+
The "Software" is each version of the software that we make available under
20+
these Terms and Conditions, as indicated by our inclusion of these Terms and
21+
Conditions with the Software.
22+
23+
### License Grant
24+
25+
Subject to your compliance with this License Grant and the Patents,
26+
Redistribution and Trademark clauses below, we hereby grant you the right to
27+
use, copy, modify, create derivative works, publicly perform, publicly display
28+
and redistribute the Software for any Permitted Purpose identified below.
29+
30+
### Permitted Purpose
31+
32+
A Permitted Purpose is any purpose other than a Competing Use. A Competing Use
33+
means making the Software available to others in a commercial product or
34+
service that:
35+
36+
1. substitutes for the Software;
37+
38+
2. substitutes for any other product or service we offer using the Software
39+
that exists as of the date we make the Software available; or
40+
41+
3. offers the same or substantially similar functionality as the Software.
42+
43+
Permitted Purposes specifically include using the Software:
44+
45+
1. for your internal use and access;
46+
47+
2. for non-commercial education;
48+
49+
3. for non-commercial research; and
50+
51+
4. in connection with professional services that you provide to a licensee
52+
using the Software in accordance with these Terms and Conditions.
53+
54+
### Patents
55+
56+
To the extent your use for a Permitted Purpose would necessarily infringe our
57+
patents, the license grant above includes a license under our patents. If you
58+
make a claim against any party that the Software infringes or contributes to
59+
the infringement of any patent, then your patent license to the Software ends
60+
immediately.
61+
62+
### Redistribution
63+
64+
The Terms and Conditions apply to all copies, modifications and derivatives of
65+
the Software.
66+
67+
If you redistribute any copies, modifications or derivatives of the Software,
68+
you must include a copy of or a link to these Terms and Conditions and not
69+
remove any copyright notices provided in or with the Software.
70+
71+
### Disclaimer
72+
73+
THE SOFTWARE IS PROVIDED "AS IS" AND WITHOUT WARRANTIES OF ANY KIND, EXPRESS OR
74+
IMPLIED, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR
75+
PURPOSE, MERCHANTABILITY, TITLE OR NON-INFRINGEMENT.
76+
77+
IN NO EVENT WILL WE HAVE ANY LIABILITY TO YOU ARISING OUT OF OR RELATED TO THE
78+
SOFTWARE, INCLUDING INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES,
79+
EVEN IF WE HAVE BEEN INFORMED OF THEIR POSSIBILITY IN ADVANCE.
80+
81+
### Trademarks
82+
83+
Except for displaying the License Details and identifying us as the origin of
84+
the Software, you have no right under these Terms and Conditions to use our
85+
trademarks, trade names, service marks or product names.
86+
87+
## Grant of Future License
88+
89+
We hereby irrevocably grant you an additional license to use the Software under
90+
the Apache License, Version 2.0 that is effective on the second anniversary of
91+
the date we make the Software available. On or after that date, you may use the
92+
Software under the Apache License, Version 2.0, in which case the following
93+
will apply:
94+
95+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
96+
this file except in compliance with the License.
97+
98+
You may obtain a copy of the License at
99+
100+
http://www.apache.org/licenses/LICENSE-2.0
101+
102+
Unless required by applicable law or agreed to in writing, software distributed
103+
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
104+
CONDITIONS OF ANY KIND, either express or implied. See the License for the
105+
specific language governing permissions and limitations under the License.

0 commit comments

Comments
 (0)