mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-11-27 11:13:48 +03:00
Fix nightly builds (#1101)
* Restore files used in nightly * fix helm test to use renamed argo * point test to correct python location * use python 3.9 for :=
This commit is contained in:
parent
9943b5ce0c
commit
8a0a0094ae
12
.github/workflows/nightly.yml
vendored
12
.github/workflows/nightly.yml
vendored
@ -75,20 +75,20 @@ jobs:
|
|||||||
- name: Build test-cryptol-remote-api
|
- name: Build test-cryptol-remote-api
|
||||||
uses: docker/build-push-action@v1
|
uses: docker/build-push-action@v1
|
||||||
with:
|
with:
|
||||||
tags: test
|
tags: latest
|
||||||
repository: galoisinc/cryptol-remote-api
|
repository: galoisinc/test-cryptol-remote-api
|
||||||
push: false
|
push: false
|
||||||
dockerfile: cryptol-remote-api/test/Dockerfile
|
dockerfile: cryptol-remote-api/test.Dockerfile
|
||||||
- name: Test cryptol-remote-api helm chart
|
- name: Test cryptol-remote-api helm chart
|
||||||
run: |
|
run: |
|
||||||
set -x
|
set -x
|
||||||
kind create cluster --wait 10m
|
kind create cluster --wait 10m
|
||||||
kind load docker-image galoisinc/cryptol-remote-api:nightly
|
kind load docker-image galoisinc/cryptol-remote-api:nightly
|
||||||
kind load docker-image galoisinc/cryptol-remote-api:test
|
kind load docker-image galoisinc/test-cryptol-remote-api:latest
|
||||||
helm install --wait cra-http ./helm/cryptol-remote-api --set server.connType=http --set image.tag=nightly
|
helm install --wait cra-http ./helm/cryptol-remote-api --set server.connType=http --set image.tag=nightly
|
||||||
helm install --wait cra-socket ./helm/cryptol-remote-api --set server.connType=socket --set image.tag=nightly
|
helm install --wait cra-socket ./helm/cryptol-remote-api --set server.connType=socket --set image.tag=nightly
|
||||||
kubectl run --rm --attach test-http --image=galoisinc/cryptol-remote-api:test --image-pull-policy=Never --restart=Never -- http cra-http-cryptol-remote-api 8080
|
kubectl run --rm --attach test-http --image=galoisinc/test-cryptol-remote-api --image-pull-policy=Never --restart=Never -- http cra-http-cryptol-remote-api 8080
|
||||||
kubectl run --rm --attach test-socket --image=galoisinc/cryptol-remote-api:test --image-pull-policy=Never --restart=Never -- socket cra-socket-cryptol-remote-api 8080
|
kubectl run --rm --attach test-socket --image=galoisinc/test-cryptol-remote-api --image-pull-policy=Never --restart=Never -- socket cra-socket-cryptol-remote-api 8080
|
||||||
|
|
||||||
docker-cryptol-remote-api-portable:
|
docker-cryptol-remote-api-portable:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
17
cryptol-remote-api/test-cryptol-remote-api.py
Normal file
17
cryptol-remote-api/test-cryptol-remote-api.py
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
import sys
|
||||||
|
import argo_client.connection as argo
|
||||||
|
import cryptol
|
||||||
|
|
||||||
|
connType = sys.argv[1]
|
||||||
|
host = sys.argv[2]
|
||||||
|
port = int(sys.argv[3])
|
||||||
|
|
||||||
|
if connType == 'socket':
|
||||||
|
c = cryptol.connect(argo.RemoteSocketProcess(host, port=port, ipv6=False))
|
||||||
|
elif connType == 'http':
|
||||||
|
c = cryptol.CryptolConnection(argo.ServerConnection(argo.HttpProcess(url="http://%s:%d/" % (host,port))))
|
||||||
|
else:
|
||||||
|
raise Exception('specify socket or http for connection type')
|
||||||
|
|
||||||
|
c.load_module('Cryptol')
|
||||||
|
assert c.evaluate_expression("1+1").result()['value'] == 2
|
8
cryptol-remote-api/test.Dockerfile
Normal file
8
cryptol-remote-api/test.Dockerfile
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
FROM python:3.9
|
||||||
|
# Intended to be built from the root of the cryptol git repository
|
||||||
|
|
||||||
|
COPY cryptol-remote-api/python python
|
||||||
|
RUN pip3 install -r python/requirements.txt
|
||||||
|
RUN pip3 install -e python
|
||||||
|
COPY cryptol-remote-api/test-cryptol-remote-api.py /entrypoint.py
|
||||||
|
ENTRYPOINT ["python3", "/entrypoint.py"]
|
Loading…
Reference in New Issue
Block a user