Skip to content

main64

main64 #6

Workflow file for this run

name: main64
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
#push:
# branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: windows-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: msys2/setup-msys2@v2
with:
update: true
msystem: MINGW64
location: D:\
install: >-
mingw-w64-x86_64-toolchain
libtool
automake-wrapper
autoconf-wrapper
mingw-w64-x86_64-tinyxml
mingw-w64-x86_64-drmingw
mingw-w64-x86_64-wxwidgets3.2-common-libs
mingw-w64-x86_64-wxwidgets3.2-common
mingw-w64-x86_64-wxwidgets3.2-msw
mingw-w64-x86_64-wxwidgets3.2-msw-libs
mingw-w64-x86_64-wxwidgets3.2-msw-cb_headers
base-devel
zip
git
mingw-w64-x86_64-hunspell
mingw-w64-x86_64-boost
unzip
mingw-w64-x86_64-wget
mingw-w64-x86_64-jq
- name: build codeblocks
shell: msys2 {0}
run: .ci/build.sh
# Get the latest release version and construct the download URL
- name: Get latest release version of pedeps tool
id: get_latest_release
shell: msys2 {0} # Use MSYS2 shell
run: |
# Fetch the latest release version from GitHub API and parse with jq
LATEST_VERSION=$(curl -s https://api.github.com/repos/brechtsanders/pedeps/releases/latest | jq -r .tag_name)
echo "Latest version is $LATEST_VERSION"
# Construct the download URL
DOWNLOAD_URL="https://github.com/brechtsanders/pedeps/releases/download/${LATEST_VERSION}/pedeps-${LATEST_VERSION}-win64.zip"
echo "DOWNLOAD_URL=${DOWNLOAD_URL}" >> $GITHUB_ENV
# Download and extract the specific pedeps release
- name: Download and extract pedeps
shell: msys2 {0} # Use MSYS2 shell
run: |
# Use the URL from the previous step to download the file
wget $DOWNLOAD_URL -O pedeps-latest.zip
# Unzip the downloaded file
unzip pedeps-latest.zip -d pedeps
# List contents of the pedeps directory to verify
ls -R pedeps
# Run copypedeps on codeblocks.exe
- name: Run copypedeps
shell: msys2 {0} # Use MSYS2 shell
run: |
# Execute copypedeps.exe if it exists
if [ -f pedeps/bin/copypedeps.exe ]; then
./pedeps/bin/copypedeps.exe -r -n -v /d/msys64/opt/codeblocks/bin/codeblocks.exe /d/msys64/opt/codeblocks/bin/
else
echo "copypedeps.exe is missing!"
exit 1
fi
# Step to handle all plugin .dll files and copy dependencies
- name: Copy dependencies for Code::Blocks plugins
shell: msys2 {0}
run: |
# Define the plugin directory and the destination directory
PLUGIN_DIR="/d/msys64/opt/codeblocks/lib/codeblocks/plugins/"
BIN_DIR="/d/msys64/opt/codeblocks/bin/"
# Loop through all .dll files in the plugin directory
for plugin in ${PLUGIN_DIR}*.dll; do
echo "Processing plugin: $plugin"
# Run copypedeps.exe to copy all the dependencies of the plugin
if [ -f pedeps/bin/copypedeps.exe ]; then
./pedeps/bin/copypedeps.exe -r -n -v "$plugin" "$BIN_DIR"
else
echo "copypedeps.exe is missing!"
exit 1
fi
# Get the plugin filename (without path)
plugin_filename=$(basename "$plugin")
# Delete the plugin DLL from the bin folder
if [ -f "$BIN_DIR$plugin_filename" ]; then
echo "Deleting copied plugin DLL: $BIN_DIR$plugin_filename"
rm "$BIN_DIR$plugin_filename"
else
echo "Plugin DLL $BIN_DIR$plugin_filename not found in bin folder."
fi
done
- uses: actions/upload-artifact@v4
with:
name: codeblocks64
path: D:\msys64\opt\codeblocks