1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
verify:
name: Verify release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
- name: Verify tag matches Cargo.toml
shell: bash
run: |
TAG_VERSION="${GITHUB_REF_NAME#v}"
CARGO_VERSION="$(
cargo metadata --no-deps --format-version 1 |
jq -r '.packages[] | select(.name == "iris-reader") | .version'
)"
if [[ "$TAG_VERSION" != "$CARGO_VERSION" ]]; then
echo "Tag version: $TAG_VERSION"
echo "Cargo version: $CARGO_VERSION"
echo "The Git tag must match Cargo.toml."
exit 1
fi
- name: Check formatting
run: cargo fmt --all -- --check
- name: Run Clippy
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: cargo test --all-features --locked
build:
name: Build ${{ matrix.name }}
needs: verify
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux x86_64
runner: ubuntu-26.04
target: x86_64-unknown-linux-gnu
platform: linux-x86_64
- name: Linux ARM64
runner: ubuntu-26.04-arm
target: aarch64-unknown-linux-gnu
platform: linux-aarch64
- name: macOS Intel
runner: macos-26-intel
target: x86_64-apple-darwin
platform: macos-x86_64
- name: macOS Apple Silicon
runner: macos-26
target: aarch64-apple-darwin
platform: macos-aarch64
- name: Windows x86_64
runner: windows-2025
target: x86_64-pc-windows-msvc
platform: windows-x86_64
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cache Cargo
uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Build
run: cargo build --release --locked --target ${{ matrix.target }}
- name: Package Unix binary
if: runner.os != 'Windows'
shell: bash
run: |
mkdir -p dist
ARCHIVE="iris-${GITHUB_REF_NAME}-${{ matrix.platform }}.tar.gz"
tar -C "target/${{ matrix.target }}/release" -czf "dist/$ARCHIVE" iris
cd dist
shasum -a 256 "$ARCHIVE" > "$ARCHIVE.sha256"
- name: Package Windows binary
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path dist | Out-Null
$archive = "iris-$env:GITHUB_REF_NAME-${{ matrix.platform }}.zip"
$binary = "target\${{ matrix.target }}\release\iris.exe"
Compress-Archive -Path $binary -DestinationPath "dist\$archive"
$hash = (Get-FileHash "dist\$archive" -Algorithm SHA256).Hash.ToLower()
"$hash $archive" | Out-File "dist\$archive.sha256" -Encoding ascii
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: release-${{ matrix.platform }}
path: dist/*
if-no-files-found: error
release:
name: Create GitHub draft release
needs: build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Download artifacts
uses: actions/download-artifact@v8
with:
pattern: release-*
path: dist
merge-multiple: true
- name: Create draft release
uses: softprops/action-gh-release@v3
with:
name: IRIS ${{ github.ref_name }}
draft: true
body_path: .github/RELEASE_TEMPLATE.md
fail_on_unmatched_files: true
files: dist/*