-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
98 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM archlinux:base-devel-20231001.0.182270 | ||
|
||
RUN echo -e "\n[multilib]\nInclude = /etc/pacman.d/mirrorlist" | sudo tee -a /etc/pacman.conf | ||
RUN pacman -Syu --noconfirm | ||
RUN pacman -Sy --noconfirm \ | ||
git \ | ||
ninja \ | ||
cmake \ | ||
python \ | ||
python-pip \ | ||
wget \ | ||
clang \ | ||
libunwind \ | ||
wine | ||
|
||
RUN python -m venv /opt/venv | ||
ENV PATH="/opt/venv/bin:$PATH" | ||
RUN pip install conan==1.60 | ||
RUN conan profile new default --detect | ||
RUN conan profile update settings.compiler.libcxx=libstdc++11 default | ||
|
||
RUN useradd -m mingw && echo "mingw:password" | chpasswd | ||
RUN echo "mingw ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/myuser | ||
USER mingw | ||
WORKDIR /home/mingw | ||
RUN git clone https://aur.archlinux.org/paru.git | ||
RUN cd paru && makepkg -si --noconfirm | ||
RUN paru -S --noconfirm mingw-w64-cmake mingw-w64-zstd mingw-w64-zlib | ||
|
||
USER root | ||
RUN ln -s /usr/x86_64-w64-mingw32/lib/librpcrt4.a /usr/x86_64-w64-mingw32/lib/libRpcRT4.a | ||
RUN userdel -r mingw | ||
WORKDIR / |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
docker pull ghcr.io/panduza/pzacx-build-img:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
|
||
IMAGE_NAME="pzacx-build-img" | ||
PROJECT_ROOT_DIR="$(dirname "$(realpath "$0")")/.." | ||
|
||
TEMP=$(getopt -o u:p:h --long username:,password:,help -n "$0" -- "$@") | ||
if [ $? != 0 ]; then | ||
echo "Error processing arguments." >&2 | ||
exit 1 | ||
fi | ||
|
||
eval set -- "$TEMP" | ||
|
||
while true; do | ||
case "$1" in | ||
-u|--username) | ||
GITHUB_USER="$2" | ||
shift 2 | ||
;; | ||
-p|--password) | ||
PASSWORD="$2" | ||
shift 2 | ||
;; | ||
-h|--help) | ||
echo "Usage: $0 [-u <username>] [-p <password>] [-h]" | ||
echo " -u --username Github username" | ||
echo " -p --password Github token" | ||
echo " -h --help Display this help message" | ||
exit 0 | ||
;; | ||
--) | ||
shift | ||
break | ||
;; | ||
*) | ||
echo "Unknown option: $1" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
if [ -z "$GITHUB_USER" ]; then | ||
echo "Username not specified" | ||
echo "-h or --help for more information" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$PASSWORD" ]; then | ||
echo "Password not specified" | ||
echo "-h or --help for more information" | ||
exit 1 | ||
fi | ||
|
||
|
||
docker login ghcr.io -u $USERNAME -p $PASSWORD || exit 1 | ||
docker build -t $IMAGE_NAME $PROJECT_ROOT_DIR/docker || exit 1 | ||
docker tag $IMAGE_NAME:latest ghcr.io/panduza/$IMAGE_NAME:latest || exit 1 | ||
docker push ghcr.io/panduza/$IMAGE_NAME:latest |