Skip to content

Commit 2cd894c

Browse files
committed
Release workflow
1 parent abfd42e commit 2cd894c

File tree

3 files changed

+141
-81
lines changed

3 files changed

+141
-81
lines changed

.github/workflows/CI.yml

Lines changed: 15 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -8,84 +8,18 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
99
cancel-in-progress: true
1010
jobs:
11-
test:
12-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
13-
env:
14-
JULIA_NUM_THREADS: 2
15-
# TODO iceberg_rust_ffi requires this and panics otherwise, we should fix that (test
16-
# bucket is publicly accessible).
17-
AWS_ACCESS_KEY_ID: root
18-
AWS_SECRET_ACCESS_KEY: password
19-
AWS_ENDPOINT_URL: http://localhost:9000
20-
AWS_REGION: us-east-1
21-
runs-on: ${{ matrix.os }}
22-
strategy:
23-
fail-fast: false
24-
matrix:
25-
include:
26-
# Ubuntu on x64
27-
- version: '1.10'
28-
os: ubuntu-latest
29-
arch: x64
30-
- version: '1.11'
31-
os: ubuntu-latest
32-
arch: x64
33-
steps:
34-
- uses: actions/[email protected]
35-
- name: Setup Rust
36-
uses: actions-rust-lang/setup-rust-toolchain@v1
37-
with:
38-
toolchain: stable
39-
- name: Build Rust FFI library
40-
run: |
41-
cd iceberg_rust_ffi
42-
cargo build --release
43-
- name: Set ICEBERG_RUST_LIB environment variable
44-
run: echo "ICEBERG_RUST_LIB=${{ github.workspace }}/iceberg_rust_ffi/target/release" >> $GITHUB_ENV
45-
- name: Initialize containers
46-
uses: gacts/run-and-post-run@v1
47-
with:
48-
run: |
49-
docker network create iceberg_net
50-
docker run -d --name minio \
51-
--network=iceberg_net -p 9000:9000 \
52-
-e MINIO_ROOT_USER=root \
53-
-e MINIO_ROOT_PASSWORD=password \
54-
-e MINIO_DOMAIN=minio \
55-
-v ${{ github.workspace }}/assets/tpch:/input minio/minio:latest server /data/
56-
until (docker exec minio mc alias set minio http://localhost:9000 root password) do echo '... waiting ...' && sleep 1; done;
57-
docker exec minio mc mb minio/warehouse
58-
docker exec minio mc cp -r /input/tpch.sf01/ minio/warehouse/tpch.sf01/
59-
docker run -d --name rest \
60-
--network=iceberg_net \
61-
-p 8181:8181 \
62-
-v ${{ github.workspace }}/assets/rest:/tmp \
63-
-e AWS_ACCESS_KEY_ID=root \
64-
-e AWS_SECRET_ACCESS_KEY=password \
65-
-e AWS_ENDPOINT_URL=http://minio:9000 \
66-
-e AWS_REGION=us-east-1 \
67-
-e CATALOG_S3_ENDPOINT=http://minio:9000 \
68-
-e CATALOG_WAREHOUSE=s3://warehouse \
69-
-e CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO apache/iceberg-rest-fixture
70-
post:
71-
docker stop rest minio && docker rm rest minio && docker network rm iceberg_net
72-
- uses: julia-actions/setup-julia@v1
73-
with:
74-
version: ${{ matrix.version }}
75-
arch: ${{ matrix.arch }}
76-
- uses: actions/cache@v4
77-
env:
78-
cache-name: cache-artifacts
79-
with:
80-
path: ~/.julia/artifacts
81-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
82-
restore-keys: |
83-
${{ runner.os }}-test-${{ env.cache-name }}-
84-
${{ runner.os }}-test-
85-
${{ runner.os }}-
86-
- uses: julia-actions/julia-buildpkg@v1
87-
- uses: julia-actions/julia-runtest@v1
88-
- uses: julia-actions/julia-processcoverage@v1
89-
- uses: codecov/codecov-action@v3
90-
with:
91-
file: lcov.info
11+
test-julia-1-10:
12+
uses: ./.github/workflows/test.yml
13+
with:
14+
build_rust: true
15+
julia_version: '1.10'
16+
os: ubuntu-latest
17+
arch: x64
18+
19+
test-julia-1-11:
20+
uses: ./.github/workflows/test.yml
21+
with:
22+
build_rust: true
23+
julia_version: '1.11'
24+
os: ubuntu-latest
25+
arch: x64

.github/workflows/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release
2+
on:
3+
release:
4+
types: [created]
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
7+
cancel-in-progress: true
8+
jobs:
9+
test-julia-1-10:
10+
uses: ./.github/workflows/test.yml
11+
with:
12+
build_rust: false
13+
julia_version: '1.10'
14+
os: ubuntu-latest
15+
arch: x64
16+
17+
test-julia-1-11:
18+
uses: ./.github/workflows/test.yml
19+
with:
20+
build_rust: false
21+
julia_version: '1.11'
22+
os: ubuntu-latest
23+
arch: x64

.github/workflows/test.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: Test
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
build_rust:
7+
description: 'Whether to build Rust FFI library from source'
8+
required: true
9+
type: boolean
10+
julia_version:
11+
description: 'Julia version to use'
12+
required: true
13+
type: string
14+
os:
15+
description: 'Operating system to run on'
16+
required: true
17+
type: string
18+
arch:
19+
description: 'Architecture to run on'
20+
required: true
21+
type: string
22+
23+
jobs:
24+
test:
25+
name: Julia ${{ inputs.julia_version }} - ${{ inputs.os }} - ${{ inputs.arch }}
26+
env:
27+
JULIA_NUM_THREADS: 2
28+
# TODO iceberg_rust_ffi requires this and panics otherwise, we should fix that (test
29+
# bucket is publicly accessible).
30+
AWS_ACCESS_KEY_ID: root
31+
AWS_SECRET_ACCESS_KEY: password
32+
AWS_ENDPOINT_URL: http://localhost:9000
33+
AWS_REGION: us-east-1
34+
runs-on: ${{ inputs.os }}
35+
steps:
36+
- uses: actions/[email protected]
37+
38+
- name: Setup Rust
39+
if: inputs.build_rust
40+
uses: actions-rust-lang/setup-rust-toolchain@v1
41+
with:
42+
toolchain: stable
43+
44+
- name: Build Rust FFI library
45+
if: inputs.build_rust
46+
run: |
47+
cd iceberg_rust_ffi
48+
cargo build --release
49+
50+
- name: Set ICEBERG_RUST_LIB environment variable
51+
if: inputs.build_rust
52+
run: echo "ICEBERG_RUST_LIB=${{ github.workspace }}/iceberg_rust_ffi/target/release" >> $GITHUB_ENV
53+
54+
- name: Initialize containers
55+
uses: gacts/run-and-post-run@v1
56+
with:
57+
run: |
58+
docker network create iceberg_net
59+
docker run -d --name minio \
60+
--network=iceberg_net -p 9000:9000 \
61+
-e MINIO_ROOT_USER=root \
62+
-e MINIO_ROOT_PASSWORD=password \
63+
-e MINIO_DOMAIN=minio \
64+
-v ${{ github.workspace }}/assets/tpch:/input minio/minio:latest server /data/
65+
until (docker exec minio mc alias set minio http://localhost:9000 root password) do echo '... waiting ...' && sleep 1; done;
66+
docker exec minio mc mb minio/warehouse
67+
docker exec minio mc cp -r /input/tpch.sf01/ minio/warehouse/tpch.sf01/
68+
docker run -d --name rest \
69+
--network=iceberg_net \
70+
-p 8181:8181 \
71+
-v ${{ github.workspace }}/assets/rest:/tmp \
72+
-e AWS_ACCESS_KEY_ID=root \
73+
-e AWS_SECRET_ACCESS_KEY=password \
74+
-e AWS_ENDPOINT_URL=http://minio:9000 \
75+
-e AWS_REGION=us-east-1 \
76+
-e CATALOG_S3_ENDPOINT=http://minio:9000 \
77+
-e CATALOG_WAREHOUSE=s3://warehouse \
78+
-e CATALOG_IO__IMPL=org.apache.iceberg.aws.s3.S3FileIO apache/iceberg-rest-fixture
79+
post:
80+
docker stop rest minio && docker rm rest minio && docker network rm iceberg_net
81+
82+
- uses: julia-actions/setup-julia@v1
83+
with:
84+
version: ${{ inputs.julia_version }}
85+
arch: ${{ inputs.arch }}
86+
87+
- uses: actions/cache@v4
88+
env:
89+
cache-name: cache-artifacts
90+
with:
91+
path: ~/.julia/artifacts
92+
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
93+
restore-keys: |
94+
${{ runner.os }}-test-${{ env.cache-name }}-
95+
${{ runner.os }}-test-
96+
${{ runner.os }}-
97+
98+
- uses: julia-actions/julia-buildpkg@v1
99+
- uses: julia-actions/julia-runtest@v1
100+
- uses: julia-actions/julia-processcoverage@v1
101+
- uses: codecov/codecov-action@v3
102+
with:
103+
file: lcov.info

0 commit comments

Comments
 (0)