|
1 name: Build distributable bundles |
|
2 |
|
3 env: |
|
4 # This overrides HG revision IDs in Makefile |
|
5 beremiz_revisionid: 9fb2ded4f1988440faf546488ee83373825330f4 |
|
6 matiec_revisionid: 2a25f4dbf4e2b1e017a3a583db7dede4771fe523 |
|
7 CanFestival-3_revisionid: 12a05e422666c738d1312259703f80150c747cb5 |
|
8 |
|
9 on: |
|
10 push: |
|
11 branches: [ default ] |
|
12 |
|
13 jobs: |
|
14 |
|
15 build: |
|
16 |
|
17 runs-on: ubuntu-latest |
|
18 |
|
19 steps: |
|
20 - uses: actions/checkout@v3 |
|
21 with: |
|
22 path: beremiz_public_dist |
|
23 |
|
24 # repositories are directly checked out wher Makerfile expect them |
|
25 - uses: actions/checkout@v3 |
|
26 with: |
|
27 repository: beremiz/beremiz |
|
28 ref: ${{ env.beremiz_revisionid }} |
|
29 path: build/sources/beremiz_${{ env.beremiz_revisionid }} |
|
30 |
|
31 - uses: actions/checkout@v3 |
|
32 with: |
|
33 repository: beremiz/matiec |
|
34 ref: ${{ env.matiec_revisionid }} |
|
35 path: build/sources/matiec_${{ env.matiec_revisionid }} |
|
36 |
|
37 - uses: actions/checkout@v3 |
|
38 with: |
|
39 repository: beremiz/CanFestival-3 |
|
40 ref: ${{ env.CanFestival-3_revisionid }} |
|
41 path: build/sources/CanFestival-3_${{ env.CanFestival-3_revisionid }} |
|
42 |
|
43 - name: Touch expected Makfile targets to shortcut HG checkout |
|
44 run: | |
|
45 touch build/sources/beremiz_src |
|
46 touch build/sources/matiec_src |
|
47 touch build/sources/CanFestival-3_src |
|
48 cat >> build/revisions.txt <<EOF |
|
49 beremiz_public_dist ${{ github.sha }} |
|
50 beremiz ${{ env.beremiz_revisionid }} |
|
51 matiec ${{ env.matiec_revisionid }} |
|
52 CanFestival-3 ${{ env.CanFestival-3_revisionid }} |
|
53 EOF |
|
54 |
|
55 # TODO: cache docker image, find files to hash for a key |
|
56 - name: Create docker image |
|
57 run: | |
|
58 cd beremiz_public_dist |
|
59 ./build_docker_image.sh |
|
60 |
|
61 - name: Create docker container |
|
62 run: | |
|
63 cd beremiz_public_dist |
|
64 ./create_docker_container.sh ${{ github.workspace }}/build |
|
65 |
|
66 - name: Run tests in docker |
|
67 run: | |
|
68 cd beremiz_public_dist |
|
69 ./build_in_docker.sh |
|
70 |
|
71 - name: Upload built artifact |
|
72 uses: actions/upload-artifact@v3 |
|
73 with: |
|
74 name: windows_bundles |
|
75 path: | |
|
76 ${{ github.workspace }}/build/Beremiz-*.exe |
|
77 ${{ github.workspace }}/build/Beremiz-*.zip |
|
78 retention-days: 5 |
|
79 |