2023-01-15 00:37:11 +01:00
|
|
|
FROM ubuntu:20.04 AS linux
|
2022-10-31 22:28:18 +01:00
|
|
|
ARG TZ=Europe/Warsaw
|
|
|
|
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
2023-01-15 00:37:11 +01:00
|
|
|
RUN apt update && apt install -y make software-properties-common zip unzip git
|
2022-10-31 22:28:18 +01:00
|
|
|
RUN add-apt-repository ppa:ubuntu-toolchain-r/test
|
|
|
|
RUN apt install -y gcc-11 g++-11 libasound2-dev
|
2023-01-15 00:37:11 +01:00
|
|
|
RUN mkdir -p /src/
|
|
|
|
WORKDIR /src/
|
|
|
|
COPY config.mk Makefile /src/
|
|
|
|
COPY .git /src/.git/
|
|
|
|
COPY musique /src/musique/
|
|
|
|
COPY lib /src/lib/
|
|
|
|
COPY scripts /src/scripts/
|
|
|
|
RUN make clean && make CC=gcc-11 CXX=g++-11
|
|
|
|
|
|
|
|
|
|
|
|
FROM ubuntu:22.04 AS windows
|
|
|
|
RUN apt update && apt install -y git make gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
|
|
|
|
RUN mkdir -p /src/
|
|
|
|
WORKDIR /src/
|
|
|
|
COPY config.mk Makefile /src/
|
|
|
|
COPY .git /src/.git/
|
|
|
|
COPY musique /src/musique/
|
|
|
|
COPY lib /src/lib/
|
|
|
|
COPY scripts /src/scripts/
|
|
|
|
RUN make clean && make os=windows CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix
|
|
|
|
|
|
|
|
|
|
|
|
FROM ubuntu:22.04 AS release
|
|
|
|
RUN apt update && apt install -y zip pandoc python3 python-is-python3 pandoc
|
|
|
|
COPY CHANGELOG.md LICENSE /musique/
|
|
|
|
COPY examples /musique/examples/
|
|
|
|
COPY --from=windows /src/bin/musique.exe /musique/musique-windows.exe
|
|
|
|
COPY --from=linux /src/bin/musique /musique/musique-linux
|
|
|
|
|
|
|
|
COPY doc /doc/
|
|
|
|
COPY scripts /scripts/
|
|
|
|
RUN python /scripts/language-cmp-cheatsheet.py /doc/musique-vs-languages-cheatsheet.template \
|
|
|
|
&& bash -c 'cp /{doc,musique}/musique-vs-languages-cheatsheet.html'
|
|
|
|
RUN pandoc -o /musique/wprowadzenie.html /doc/wprowadzenie.md -s --toc
|
|
|
|
RUN zip -r musique.zip /musique/
|