--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/.github/workflows/build_bundles.yml Thu May 19 18:29:38 2022 +0200
@@ -0,0 +1,79 @@
+name: Build distributable bundles
+
+env:
+ # This overrides HG revision IDs in Makefile
+ beremiz_revisionid: 9fb2ded4f1988440faf546488ee83373825330f4
+ matiec_revisionid: 2a25f4dbf4e2b1e017a3a583db7dede4771fe523
+ CanFestival-3_revisionid: 12a05e422666c738d1312259703f80150c747cb5
+
+on:
+ push:
+ branches: [ default ]
+
+jobs:
+
+ build:
+
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ path: beremiz_public_dist
+
+ # repositories are directly checked out wher Makerfile expect them
+ - uses: actions/checkout@v3
+ with:
+ repository: beremiz/beremiz
+ ref: ${{ env.beremiz_revisionid }}
+ path: build/sources/beremiz_${{ env.beremiz_revisionid }}
+
+ - uses: actions/checkout@v3
+ with:
+ repository: beremiz/matiec
+ ref: ${{ env.matiec_revisionid }}
+ path: build/sources/matiec_${{ env.matiec_revisionid }}
+
+ - uses: actions/checkout@v3
+ with:
+ repository: beremiz/CanFestival-3
+ ref: ${{ env.CanFestival-3_revisionid }}
+ path: build/sources/CanFestival-3_${{ env.CanFestival-3_revisionid }}
+
+ - name: Touch expected Makfile targets to shortcut HG checkout
+ run: |
+ touch build/sources/beremiz_src
+ touch build/sources/matiec_src
+ touch build/sources/CanFestival-3_src
+ cat >> build/revisions.txt <<EOF
+ beremiz_public_dist ${{ github.sha }}
+ beremiz ${{ env.beremiz_revisionid }}
+ matiec ${{ env.matiec_revisionid }}
+ CanFestival-3 ${{ env.CanFestival-3_revisionid }}
+ EOF
+
+ # TODO: cache docker image, find files to hash for a key
+ - name: Create docker image
+ run: |
+ cd beremiz_public_dist
+ ./build_docker_image.sh
+
+ - name: Create docker container
+ run: |
+ cd beremiz_public_dist
+ ./create_docker_container.sh ${{ github.workspace }}/build
+
+ - name: Run tests in docker
+ run: |
+ cd beremiz_public_dist
+ ./build_in_docker.sh
+
+ - name: Upload built artifact
+ uses: actions/upload-artifact@v3
+ with:
+ name: windows_bundles
+ path: |
+ ${{ github.workspace }}/build/Beremiz-*.exe
+ ${{ github.workspace }}/build/Beremiz-*.zip
+ retention-days: 5
+
--- a/Dockerfile Tue May 17 16:03:04 2022 +0200
+++ b/Dockerfile Thu May 19 18:29:38 2022 +0200
@@ -22,10 +22,9 @@
# easy to remember 'build' alias to invoke main makefile
ARG OWNDIRBASENAME=beremiz_public_dist
ENV OWNDIRBASENAME ${OWNDIRBASENAME}
-RUN echo -e '#!/bin/bash\nmake -f /home/devel/src/'$OWNDIRBASENAME'/Makefile $*' > /usr/local/bin/build
+RUN echo -e '#!/bin/bash\nmake -f /home/'$UNAME'/src/'$OWNDIRBASENAME'/Makefile $*' > /usr/local/bin/build
RUN chmod +x /usr/local/bin/build
USER $UNAME
RUN mkdir /home/$UNAME/build /home/$UNAME/src
-
--- a/Makefile Tue May 17 16:03:04 2022 +0200
+++ b/Makefile Thu May 19 18:29:38 2022 +0200
@@ -63,7 +63,7 @@
$(foreach project,$(OWN_PROJECTS),$(eval $(call get_revision,$(project))))
define get_revisionid
-$(1)_revisionid=$(shell hg -R $(HGROOT)/$(1) id -i -r $($(1)_revision))
+$(1)_revisionid?=$(shell hg -R $(HGROOT)/$(1) id -i -r $($(1)_revision))
endef
$(foreach project,$(OWN_PROJECTS),$(eval $(call get_revisionid,$(project))))
--- a/build_in_docker.sh Tue May 17 16:03:04 2022 +0200
+++ b/build_in_docker.sh Thu May 19 18:29:38 2022 +0200
@@ -3,6 +3,6 @@
CONTAINER=beremiz_public_builder_current
docker start $CONTAINER
-docker exec -i -t $CONTAINER bash -i -c build $1
+docker exec $CONTAINER bash -c build $1
docker stop $CONTAINER
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distfiles/msys2-base-i686-20210705.tar.xz.md5 Thu May 19 18:29:38 2022 +0200
@@ -0,0 +1,1 @@
+1b69961d9ff13cbace8036bc04eae28a msys2-base-i686-20210705.tar.xz
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/distfiles/pacman-6.0.0.tar.xz.md5 Thu May 19 18:29:38 2022 +0200
@@ -0,0 +1,1 @@
+d68ce8f9cc69fb58d2ee3a932b9df6d5 pacman-6.0.0.tar.xz
--- a/win32.mk Tue May 17 16:03:04 2022 +0200
+++ b/win32.mk Thu May 19 18:29:38 2022 +0200
@@ -5,17 +5,19 @@
ide_targets_from_dist: canfestival
touch $@
-CFbuild = installer/CanFestival-3
-canfestival: $(msysdir)/.stamp
- rm -rf $(CFbuild)
- $(call get_src_hg,$(CFbuild))
- cd $(CFbuild); \
+CanFestival-3_dir = installer/CanFestival-3
+CanFestival-3: $(CanFestival-3_dir)/.stamp
+$(CanFestival-3_dir)/.stamp: sources/CanFestival-3_src | installer
+canfestival: $(CanFestival-3_dir)/.stamp
+ rm -rf $(CanFestival-3_dir)
+ cp -a sources/CanFestival-3 $(CanFestival-3_dir)
+ cd $(CanFestival-3_dir); \
./configure --can=tcp_win32 \
--cc=$(CC) \
--cxx=$(CXX) \
--target=win32 \
--wx=0
- $(MAKE) -C $(CFbuild)
- cd $(CFbuild); find . -name "*.o" -exec rm {} ';' #remove object files only
+ $(MAKE) -C $(CanFestival-3_dir)
+ cd $(CanFestival-3_dir); find . -name "*.o" -exec rm {} ';' #remove object files only
touch $@