@@ -21,174 +21,174 @@ defaults:
2121 shell : bash
2222
2323jobs :
24- format :
25- name : Check format
26- runs-on : [runner-amd64-large]
27- continue-on-error : true
28- steps :
29- - name : Install stable toolchain
30- uses : dtolnay/rust-toolchain@stable
31- with :
32- components : rustfmt
33-
34- - name : Checkout sources
35- uses : actions/checkout@v4
36-
37- - name : Setup cache
38- uses : Swatinem/rust-cache@v2
39- with :
40- cache-on-failure : true
41- save-if : ${{ github.ref == 'refs/heads/main' }}
42-
43- - name : Check format
44- run : cargo fmt --all --check
45-
46- clippy :
47- name : Check clippy
48- runs-on : [runner-amd64-large]
49- continue-on-error : true
50- steps :
51- - name : Install stable toolchain
52- uses : dtolnay/rust-toolchain@stable
53- with :
54- components : clippy
55-
56- - name : Checkout sources
57- uses : actions/checkout@v4
58-
59- - name : Setup cache
60- uses : Swatinem/rust-cache@v2
61- with :
62- cache-on-failure : true
63- save-if : ${{ github.ref == 'refs/heads/main' }}
64-
65- - name : Check clippy
66- run : cargo clippy --tests --all-features -- -D warnings
67-
68- test :
69- name : Check tests
70- runs-on : [runner-amd64-large]
71- continue-on-error : true
72- steps :
73- - name : Install stable toolchain
74- uses : dtolnay/rust-toolchain@stable
75-
76- - name : Checkout sources
77- uses : actions/checkout@v4
78-
79- - name : Setup cache
80- uses : Swatinem/rust-cache@v2
81- with :
82- cache-on-failure : true
83- save-if : ${{ github.ref == 'refs/heads/main' }}
84-
85- - name : Check tests
86- run : cargo test
87-
88- build :
89- name : Build crud-bench (${{ matrix.name }})
90- strategy :
91- matrix :
92- include :
93- - name : amd64
94- runner : runner-amd64-large
95- target : x86_64-unknown-linux-gnu
96- - name : arm64
97- runner : runner-arm64-large
98- target : aarch64-unknown-linux-gnu
99- runs-on : ${{ matrix.runner }}
100- continue-on-error : true
101- steps :
102- - name : Install stable toolchain
103- uses : dtolnay/rust-toolchain@stable
104-
105- - name : Checkout sources
106- uses : actions/checkout@v4
107-
108- - name : Setup cache
109- uses : Swatinem/rust-cache@v2
110- with :
111- cache-on-failure : true
112- save-if : ${{ github.ref == 'refs/heads/main' }}
113-
114- - name : Build benchmark
115- run : cargo build --release --target ${{ matrix.target }}
116-
117- - name : Upload artifact
118- uses : actions/upload-artifact@v4
119- with :
120- name : crud-bench-${{ matrix.name }}
121- path : target/${{ matrix.target }}/release/crud-bench
122-
123- docker-build :
124- name : Build Docker image
125- runs-on : [runner-amd64-large-private]
126- needs : build
127- continue-on-error : true
128- steps :
129- - name : Checkout sources
130- uses : actions/checkout@v4
131-
132- - name : Download amd64 artifact
133- uses : actions/download-artifact@v4
134- with :
135- name : crud-bench-amd64
136- path : ${{ github.workspace }}/artifacts/crud-bench-amd64
137-
138- - name : Download arm64 artifact
139- uses : actions/download-artifact@v4
140- with :
141- name : crud-bench-arm64
142- path : ${{ github.workspace }}/artifacts/crud-bench-arm64
143-
144- - name : Review downloaded artifacts
145- run : find artifacts
146-
147- - name : Make crud-bench executable
148- run : chmod +x ${{ github.workspace }}/artifacts/crud-bench-amd64/crud-bench ${{ github.workspace }}/artifacts/crud-bench-arm64/crud-bench
149-
150- - name : Login to Amazon ECR
151- id : login-ecr
152- run : |
153- REGION=${{ secrets.REGISTRY_AWS_REGION }}
154- REGISTRY=${{ secrets.REGISTRY_AWS_ACCOUNT_ID }}.dkr.ecr.$REGION.amazonaws.com
155- aws ecr get-login-password --region $REGION | docker login --username AWS --password-stdin $REGISTRY
156- echo "registry=$REGISTRY" >> $GITHUB_OUTPUT
157-
158- - name : Set up QEMU
159- uses : docker/setup-qemu-action@v3
160-
161- - name : Set up Buildx
162- uses : docker/setup-buildx-action@v3
163- with :
164- driver-opts : |
165- image=${{ secrets.REGISTRY_AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.REGISTRY_AWS_REGION }}.amazonaws.com/docker-hub/moby/buildkit:buildx-stable-1
166-
167- - name : Set docker tag
168- id : image
169- run : |
170- set -x
171- DOCKER_REPO=${{ steps.login-ecr.outputs.registry }}/crud-bench
172- DOCKER_TAG=$(git rev-parse --short "$GITHUB_SHA")
173- echo "docker-repo=$DOCKER_REPO" >> $GITHUB_OUTPUT
174- echo "docker-tag=$DOCKER_TAG" >> $GITHUB_OUTPUT
175-
176- - name : Build Docker image for testing
177- uses : docker/build-push-action@v6
178- if : github.event_name == 'pull_request'
179- with :
180- context : .
181- platforms : linux/amd64,linux/arm64
182- tags : ${{ steps.image.outputs.docker-repo }}:${{ steps.image.outputs.docker-tag }}
183-
184- - name : Build and push Docker image for release
185- uses : docker/build-push-action@v6
186- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
187- with :
188- context : .
189- platforms : linux/amd64,linux/arm64
190- tags : ${{ steps.image.outputs.docker-repo }}:${{ steps.image.outputs.docker-tag }}
191- push : true
24+ # format:
25+ # name: Check format
26+ # runs-on: [runner-amd64-large]
27+ # continue-on-error: true
28+ # steps:
29+ # - name: Install stable toolchain
30+ # uses: dtolnay/rust-toolchain@stable
31+ # with:
32+ # components: rustfmt
33+
34+ # - name: Checkout sources
35+ # uses: actions/checkout@v4
36+
37+ # - name: Setup cache
38+ # uses: Swatinem/rust-cache@v2
39+ # with:
40+ # cache-on-failure: true
41+ # save-if: ${{ github.ref == 'refs/heads/main' }}
42+
43+ # - name: Check format
44+ # run: cargo fmt --all --check
45+
46+ # clippy:
47+ # name: Check clippy
48+ # runs-on: [runner-amd64-large]
49+ # continue-on-error: true
50+ # steps:
51+ # - name: Install stable toolchain
52+ # uses: dtolnay/rust-toolchain@stable
53+ # with:
54+ # components: clippy
55+
56+ # - name: Checkout sources
57+ # uses: actions/checkout@v4
58+
59+ # - name: Setup cache
60+ # uses: Swatinem/rust-cache@v2
61+ # with:
62+ # cache-on-failure: true
63+ # save-if: ${{ github.ref == 'refs/heads/main' }}
64+
65+ # - name: Check clippy
66+ # run: cargo clippy --tests --all-features -- -D warnings
67+
68+ # test:
69+ # name: Check tests
70+ # runs-on: [runner-amd64-large]
71+ # continue-on-error: true
72+ # steps:
73+ # - name: Install stable toolchain
74+ # uses: dtolnay/rust-toolchain@stable
75+
76+ # - name: Checkout sources
77+ # uses: actions/checkout@v4
78+
79+ # - name: Setup cache
80+ # uses: Swatinem/rust-cache@v2
81+ # with:
82+ # cache-on-failure: true
83+ # save-if: ${{ github.ref == 'refs/heads/main' }}
84+
85+ # - name: Check tests
86+ # run: cargo test
87+
88+ # build:
89+ # name: Build crud-bench (${{ matrix.name }})
90+ # strategy:
91+ # matrix:
92+ # include:
93+ # - name: amd64
94+ # runner: runner-amd64-large
95+ # target: x86_64-unknown-linux-gnu
96+ # - name: arm64
97+ # runner: runner-arm64-large
98+ # target: aarch64-unknown-linux-gnu
99+ # runs-on: ${{ matrix.runner }}
100+ # continue-on-error: true
101+ # steps:
102+ # - name: Install stable toolchain
103+ # uses: dtolnay/rust-toolchain@stable
104+
105+ # - name: Checkout sources
106+ # uses: actions/checkout@v4
107+
108+ # - name: Setup cache
109+ # uses: Swatinem/rust-cache@v2
110+ # with:
111+ # cache-on-failure: true
112+ # save-if: ${{ github.ref == 'refs/heads/main' }}
113+
114+ # - name: Build benchmark
115+ # run: cargo build --release --target ${{ matrix.target }}
116+
117+ # - name: Upload artifact
118+ # uses: actions/upload-artifact@v4
119+ # with:
120+ # name: crud-bench-${{ matrix.name }}
121+ # path: target/${{ matrix.target }}/release/crud-bench
122+
123+ # docker-build:
124+ # name: Build Docker image
125+ # runs-on: [runner-amd64-large-private]
126+ # needs: build
127+ # continue-on-error: true
128+ # steps:
129+ # - name: Checkout sources
130+ # uses: actions/checkout@v4
131+
132+ # - name: Download amd64 artifact
133+ # uses: actions/download-artifact@v4
134+ # with:
135+ # name: crud-bench-amd64
136+ # path: ${{ github.workspace }}/artifacts/crud-bench-amd64
137+
138+ # - name: Download arm64 artifact
139+ # uses: actions/download-artifact@v4
140+ # with:
141+ # name: crud-bench-arm64
142+ # path: ${{ github.workspace }}/artifacts/crud-bench-arm64
143+
144+ # - name: Review downloaded artifacts
145+ # run: find artifacts
146+
147+ # - name: Make crud-bench executable
148+ # run: chmod +x ${{ github.workspace }}/artifacts/crud-bench-amd64/crud-bench ${{ github.workspace }}/artifacts/crud-bench-arm64/crud-bench
149+
150+ # - name: Login to Amazon ECR
151+ # id: login-ecr
152+ # run: |
153+ # REGION=${{ secrets.REGISTRY_AWS_REGION }}
154+ # REGISTRY=${{ secrets.REGISTRY_AWS_ACCOUNT_ID }}.dkr.ecr.$REGION.amazonaws.com
155+ # aws ecr get-login-password --region $REGION | docker login --username AWS --password-stdin $REGISTRY
156+ # echo "registry=$REGISTRY" >> $GITHUB_OUTPUT
157+
158+ # - name: Set up QEMU
159+ # uses: docker/setup-qemu-action@v3
160+
161+ # - name: Set up Buildx
162+ # uses: docker/setup-buildx-action@v3
163+ # with:
164+ # driver-opts: |
165+ # image=${{ secrets.REGISTRY_AWS_ACCOUNT_ID }}.dkr.ecr.${{ secrets.REGISTRY_AWS_REGION }}.amazonaws.com/docker-hub/moby/buildkit:buildx-stable-1
166+
167+ # - name: Set docker tag
168+ # id: image
169+ # run: |
170+ # set -x
171+ # DOCKER_REPO=${{ steps.login-ecr.outputs.registry }}/crud-bench
172+ # DOCKER_TAG=$(git rev-parse --short "$GITHUB_SHA")
173+ # echo "docker-repo=$DOCKER_REPO" >> $GITHUB_OUTPUT
174+ # echo "docker-tag=$DOCKER_TAG" >> $GITHUB_OUTPUT
175+
176+ # - name: Build Docker image for testing
177+ # uses: docker/build-push-action@v6
178+ # if: github.event_name == 'pull_request'
179+ # with:
180+ # context: .
181+ # platforms: linux/amd64,linux/arm64
182+ # tags: ${{ steps.image.outputs.docker-repo }}:${{ steps.image.outputs.docker-tag }}
183+
184+ # - name: Build and push Docker image for release
185+ # uses: docker/build-push-action@v6
186+ # if: github.event_name == 'push' && github.ref == 'refs/heads/main'
187+ # with:
188+ # context: .
189+ # platforms: linux/amd64,linux/arm64
190+ # tags: ${{ steps.image.outputs.docker-repo }}:${{ steps.image.outputs.docker-tag }}
191+ # push: true
192192
193193 benchmark :
194194 name : Benchmark ${{ matrix.description }}
0 commit comments