Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cuteLib-hsrt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Glaser
cuteLib-hsrt
Commits
98e526aa
Commit
98e526aa
authored
4 weeks ago
by
tobiglaser
Browse files
Options
Downloads
Patches
Plain Diff
commented and cleaned up gitlab-ci
parent
0c145e21
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+15
-18
15 additions, 18 deletions
.gitlab-ci.yml
with
15 additions
and
18 deletions
.gitlab-ci.yml
+
15
−
18
View file @
98e526aa
...
@@ -9,50 +9,44 @@ Windows-MSYS2-MINGW64:
...
@@ -9,50 +9,44 @@ Windows-MSYS2-MINGW64:
-
tags
-
tags
tags
:
[
windows
,
msys2
]
tags
:
[
windows
,
msys2
]
script
:
script
:
# Installing MSYS2
-
Invoke-WebRequest -OutFile "msys2.exe" -Uri "https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe"
-
Invoke-WebRequest -OutFile "msys2.exe" -Uri "https://github.com/msys2/msys2-installer/releases/download/nightly-x86_64/msys2-base-x86_64-latest.sfx.exe"
-
Get-FileHash ./msys2.exe -Algorithm SHA256 | Format-List
-
Get-FileHash ./msys2.exe -Algorithm SHA256 | Format-List
-
./msys2.exe -y -oC:\
-
./msys2.exe -y -oC:\
-
$env:CHERE_INVOKING = 'yes'
-
$env:CHERE_INVOKING = 'yes'
-
$env:MSYSTEM = 'MINGW64'
# https://www.msys2.org/docs/environments/
-
$env:MSYSTEM = 'MINGW64'
# https://www.msys2.org/docs/environments/
-
|
-
|
# Appending MSYS-MINGW64s Path to the Users PATH variable
echo
"Updating Path"
Write-Output
"Updating Path
...
"
$NewPath = "C:\msys64\mingw64\bin"
$NewPath = "C:\msys64\mingw64\bin"
$CurrentPath = [System.Environment]::GetEnvironmentVariable("Path", "User") -split ";"
$CurrentPath = [System.Environment]::GetEnvironmentVariable("Path", "User") -split ";"
Write-Output "
o
ld Path: $CurrentPath"
Write-Output "
O
ld Path: $CurrentPath"
if ($CurrentPath -contains $NewPath) {
if ($CurrentPath -contains $NewPath) {
Write-Output "Path is already in the user PATH variable."
Write-Output "
New
Path is already in the user PATH variable."
} else {
} else {
Write-Output "Path is NOT in the user PATH variable. Updating..."
Write-Output "
New
Path is NOT in the user PATH variable. Updating..."
[System.Environment]::SetEnvironmentVariable("Path", "$($CurrentPath -join ';');$NewPath", "User")
[System.Environment]::SetEnvironmentVariable("Path", "$($CurrentPath -join ';');$NewPath", "User")
Write-Output "Path updated successfully!"
Write-Output "Path updated successfully!"
$CurrentPath = [System.Environment]::GetEnvironmentVariable("Path", "User") -split ";"
Write-Output "New Path: $CurrentPath"
}
}
-
|
# Updating the MSYS2 Environment
$CurrentPath = [System.Environment]::GetEnvironmentVariable("Path", "User") -split ";"
Write-Output "new Path: $CurrentPath"
-
C:\msys64\usr\bin\bash -lc ' '
-
C:\msys64\usr\bin\bash -lc ' '
-
C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
-
C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
-
C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
-
C:\msys64\usr\bin\bash -lc 'pacman --noconfirm -Syuu'
-
|
-
|
# Installing the necessary Packages
C:\msys64\usr\bin\bash -lcx '
C:\msys64\usr\bin\bash -lcx '
pacman --noconfirm -Syu mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake
pacman --noconfirm -Syu mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake
pacman --noconfirm -Syu mingw-w64-x86_64-qt5-static
pacman --noconfirm -Syu mingw-w64-x86_64-qt5-static
pacman --noconfirm -Syu zip'
pacman --noconfirm -Syu zip'
-
|
-
|
# Building
C:\msys64\usr\bin\bash -lcx '
C:\msys64\usr\bin\bash -lcx '
mkdir -p build
mkdir -p build
cd build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
ls -lh
rm -r *
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
ls -lh
rm -r *
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++
ls -lh
cmake --build . --target cute
cmake --build . --target cute
ls -lh
ls -lh
cd ..'
cd ..'
-
|
-
|
# Collecting all Files and zipping them
C:\msys64\usr\bin\bash -lcx '
C:\msys64\usr\bin\bash -lcx '
mkdir -p template/{lib,src}
mkdir -p template/{lib,src}
mv build/cute.dll template/lib/
mv build/cute.dll template/lib/
...
@@ -66,9 +60,12 @@ Windows-MSYS2-MINGW64:
...
@@ -66,9 +60,12 @@ Windows-MSYS2-MINGW64:
mv .gitignore template/
mv .gitignore template/
zip -r template-windows.zip template/
zip -r template-windows.zip template/
'
'
# Uploading the zip to the Package Registry
-
$URL = "${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-windows.zip"
-
$URL = "${CI_API_V4_URL}/projects/$CI_PROJECT_ID/packages/generic/cutelib-hsrt/$CI_COMMIT_TAG/template-windows.zip"
-
Invoke-WebRequest -Uri $URL -Method Put -Headers @{ "JOB-TOKEN" = "$CI_JOB_TOKEN" } -InFile "template-windows.zip" -UseBasicParsing
-
Invoke-WebRequest -Uri $URL -Method Put -Headers @{ "JOB-TOKEN" = "$CI_JOB_TOKEN" } -InFile "template-windows.zip" -UseBasicParsing
# Automatically publishing a new Release with the files Uploaded to the Package Registry.
# The Release may be edited manually under gitlab -> project -> deploy -> releases.
Publish
:
Publish
:
stage
:
release
stage
:
release
only
:
only
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment