Skip to content

Commit ab73719

Browse files
committed
release 0.1.0
1 parent e4b9e6c commit ab73719

16 files changed

Lines changed: 1404 additions & 416 deletions

.github/workflows/ci.yml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
pull_request:
77
branches: [main]
88

9-
# Cancel in-progress runs for the same branch/PR
109
concurrency:
1110
group: ci-${{ github.ref }}
1211
cancel-in-progress: true
@@ -106,6 +105,28 @@ jobs:
106105
if: always()
107106
run: nix develop .#ci --command es-stop
108107

108+
examples-build:
109+
name: Examples Build
110+
runs-on: ubuntu-latest
111+
needs: [unit-tests]
112+
steps:
113+
- uses: actions/checkout@v4
114+
- uses: DeterminateSystems/nix-installer-action@main
115+
- uses: DeterminateSystems/magic-nix-cache-action@main
116+
- name: Cache Zig build artifacts
117+
uses: actions/cache@v4
118+
with:
119+
path: |
120+
.zig-cache
121+
~/.cache/zig
122+
examples/.zig-cache
123+
examples/~/.cache/zig
124+
key: zig-examples-${{ hashFiles('build.zig', 'build.zig.zon', 'src/**', 'examples/**') }}
125+
restore-keys: |
126+
zig-examples-
127+
- name: Build examples
128+
run: cd examples && nix develop ..#ci --command zig build
129+
109130
build-check:
110131
name: Build Check (${{ matrix.os }})
111132
runs-on: ${{ matrix.os }}

.github/workflows/release.yml

Lines changed: 23 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,78 +8,45 @@ on:
88
permissions:
99
contents: write
1010

11-
# Cancel in-progress runs for the same tag
1211
concurrency:
1312
group: release-${{ github.ref }}
1413
cancel-in-progress: true
1514

1615
jobs:
17-
build:
18-
name: Build (${{ matrix.target }})
19-
runs-on: ${{ matrix.os }}
20-
strategy:
21-
fail-fast: false
22-
matrix:
23-
include:
24-
- target: x86_64-linux
25-
os: ubuntu-latest
26-
- target: aarch64-linux
27-
os: ubuntu-latest
28-
- target: x86_64-macos
29-
os: macos-latest
30-
- target: aarch64-macos
31-
os: macos-latest
32-
16+
test:
17+
name: Pre-release Tests
18+
runs-on: ubuntu-latest
3319
steps:
34-
- name: Checkout
35-
uses: actions/checkout@v4
36-
37-
- name: Install Nix
38-
uses: DeterminateSystems/nix-installer-action@main
39-
40-
- name: Nix cache
41-
uses: DeterminateSystems/magic-nix-cache-action@main
42-
43-
- name: Cache Zig build artifacts
44-
uses: actions/cache@v4
45-
with:
46-
path: |
47-
.zig-cache
48-
~/.cache/zig
49-
key: zig-release-${{ matrix.target }}-${{ hashFiles('build.zig', 'build.zig.zon', 'src/**') }}
50-
restore-keys: |
51-
zig-release-${{ matrix.target }}-
52-
53-
- name: Build
54-
run: nix develop .#ci --command zig build -Doptimize=ReleaseSafe -Dtarget=${{ matrix.target }}
55-
56-
- name: Create tarball
57-
run: tar -czf elaztic-${{ github.ref_name }}-${{ matrix.target }}.tar.gz -C zig-out/bin elaztic
58-
59-
- name: Upload artifact
60-
uses: actions/upload-artifact@v4
61-
with:
62-
name: elaztic-${{ matrix.target }}
63-
path: elaztic-${{ github.ref_name }}-${{ matrix.target }}.tar.gz
20+
- uses: actions/checkout@v4
21+
- uses: DeterminateSystems/nix-installer-action@main
22+
- uses: DeterminateSystems/magic-nix-cache-action@main
23+
- name: Run unit tests
24+
run: nix develop .#ci --command zig build test --summary all
25+
- name: Start OpenSearch
26+
run: nix develop .#ci --command es-start
27+
- name: Run smoke tests
28+
run: nix develop .#ci --command zig build test-smoke --summary all
29+
env:
30+
ES_URL: http://localhost:9200
31+
- name: Run integration tests
32+
run: nix develop .#ci --command zig build test-integration --summary all
33+
env:
34+
ES_URL: http://localhost:9200
35+
- name: Stop OpenSearch
36+
if: always()
37+
run: nix develop .#ci --command es-stop
6438

6539
release:
6640
name: Create Release
67-
needs: build
41+
needs: test
6842
runs-on: ubuntu-latest
6943
permissions:
7044
contents: write
71-
7245
steps:
73-
- name: Download all artifacts
74-
uses: actions/download-artifact@v4
75-
with:
76-
pattern: elaztic-*
77-
merge-multiple: true
78-
46+
- uses: actions/checkout@v4
7947
- name: Create GitHub Release
8048
uses: softprops/action-gh-release@v2
8149
with:
82-
files: elaztic-*.tar.gz
8350
generate_release_notes: true
8451
draft: false
8552
prerelease: ${{ contains(github.ref_name, '-rc') || contains(github.ref_name, '-beta') || contains(github.ref_name, '-alpha') }}

0 commit comments

Comments
 (0)