1- name : Build LibCarnaPy and Docker image
1+ name : Build and Test
22
33on :
44 push :
99 - ' **'
1010
1111jobs :
12- build_carnapy :
13- name : Build LibCarnaPy
12+ build :
13+ name : Build
1414 runs-on : ubuntu-latest
1515 steps :
1616 -
2121 uses : conda-incubator/setup-miniconda@v2
2222 with :
2323 miniconda-version : ' latest'
24- python-version : ' 3.10 '
24+ python-version : ' 3.9 '
2525 channels : conda-forge, defaults
2626 use-only-tar-bz2 : true # IMPORTANT: This needs to be set for caching to work properly!
2727 auto-update-conda : true
@@ -31,60 +31,11 @@ jobs:
3131 run : echo "CONDA_PREFIX=$CONDA" >> $GITHUB_ENV
3232 -
3333 name : Build dist
34- run : sh linux_build.sh
35- -
36- name : Collect artifact data
37- run : |
38- mkdir /tmp/dist
39- cp /usr/local/lib/libCarna-*.so /tmp/dist
40- rm /tmp/dist/libCarna-*d.so
41- cp $(find /home/runner/work -name '*.whl') /tmp/dist/
34+ run : ./linux_build.bash
4235 -
4336 name : Build and upload artifact
4437 uses : actions/upload-artifact@v3
4538 with :
4639 name : dist
4740 path : |
48- /tmp/dist
49-
50- build_docker :
51- name : Build Docker image
52- needs : build_carnapy
53- runs-on : ubuntu-latest
54- steps :
55- -
56- name : Git checkout
57- uses : actions/checkout@v2
58- -
59- name : Download artifact
60- uses : actions/download-artifact@v3
61- with :
62- name : dist
63- -
64- name : Inspect working directory
65- run : tree .
66- -
67- name : Set up QEMU
68- uses : docker/setup-qemu-action@v3
69- -
70- name : Set up Docker Buildx
71- uses : docker/setup-buildx-action@v3
72- -
73- name : Login to Docker Hub
74- uses : docker/login-action@v3
75- with :
76- username : ${{ secrets.DOCKERHUB_USERNAME }}
77- password : ${{ secrets.DOCKERHUB_TOKEN }}
78- -
79- name : Setup repository name
80- id : setup_repository_name
81- run : |
82- echo "docker_repository=${GITHUB_REPOSITORY,,}" >> $GITHUB_OUTPUT
83- -
84- name : Build and push
85- uses : docker/build-push-action@v5
86- with :
87- file : .github/Dockerfile
88- context : .
89- push : true
90- tags : ${{ steps.setup_repository_name.outputs.docker_repository }}:${{ github.ref_name }}
41+ dist
0 commit comments