Compare commits
18 commits
Author | SHA1 | Date | |
---|---|---|---|
24a8bdc0eb | |||
e80a8bfd9a | |||
fabcfd913f | |||
2b80bf5bed | |||
5501128100 | |||
7d02b9335f | |||
79b16ccc81 | |||
6f38776809 | |||
d438bb0235 | |||
00fbd3edde | |||
991eddcbfe | |||
6bf852f010 | |||
34a838be7b | |||
f472e32711 | |||
1714a761e4 | |||
ef3c8ff87c | |||
5dae3bbd7f | |||
92e308e552 |
3 changed files with 70 additions and 42 deletions
|
@ -1,32 +0,0 @@
|
||||||
steps:
|
|
||||||
- name: Build
|
|
||||||
image: alpine
|
|
||||||
commands:
|
|
||||||
- apk add --no-cache g++ libc-dev
|
|
||||||
- mkdir -p build
|
|
||||||
- echo "Building project..."
|
|
||||||
- g++ -o build/main main.cpp
|
|
||||||
|
|
||||||
- name: discord notification
|
|
||||||
image: appleboy/drone-discord
|
|
||||||
settings:
|
|
||||||
webhook_id: 1357683988373704824
|
|
||||||
webhook_token: wtAZM1Ps4upFV0Z5_HJKzWkJ19-lj0tagEwPofOJN4O3OHuET309RTkKQgakDWVrl0Ml
|
|
||||||
message: >
|
|
||||||
{{#success build.status}}
|
|
||||||
build {{build.number}} succeeded. Good job.
|
|
||||||
{{else}}
|
|
||||||
build {{build.number}} failed. Fix me please.
|
|
||||||
{{/success}}
|
|
||||||
depends_on:
|
|
||||||
- Build
|
|
||||||
|
|
||||||
- name: Release
|
|
||||||
image: plugins/gitea-release
|
|
||||||
settings:
|
|
||||||
api_key: GITEA_TOKEN
|
|
||||||
base_url: https://git.xyro.win/nyosic/MarioDB
|
|
||||||
files: build/main
|
|
||||||
when:
|
|
||||||
event:
|
|
||||||
- tag
|
|
64
.woodpecker/woodpecker.yaml
Normal file
64
.woodpecker/woodpecker.yaml
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
steps:
|
||||||
|
- name: Build
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache g++ libc-dev
|
||||||
|
- mkdir -p build
|
||||||
|
- echo "Building project..."
|
||||||
|
- g++ -O2 -static -o build/main main.cpp
|
||||||
|
- chmod +x build/main
|
||||||
|
|
||||||
|
- name: Check Static
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache file
|
||||||
|
- file build/main
|
||||||
|
- ldd build/main || echo "Static binary - no dynamic dependencies"
|
||||||
|
depends_on:
|
||||||
|
- Build
|
||||||
|
|
||||||
|
- name: Test-Debian
|
||||||
|
image: debian:bullseye
|
||||||
|
commands:
|
||||||
|
- apt-get update && apt-get install -y ca-certificates
|
||||||
|
- ./build/main
|
||||||
|
depends_on:
|
||||||
|
- Build
|
||||||
|
|
||||||
|
- name: discord notification
|
||||||
|
image: appleboy/drone-discord
|
||||||
|
settings:
|
||||||
|
webhook_id: 1357683988373704824
|
||||||
|
webhook_token:
|
||||||
|
from_secret: WEBHOOK_TOKEN
|
||||||
|
message: >
|
||||||
|
{{#success build.status}}
|
||||||
|
build {{build.number}} succeeded. Good job.
|
||||||
|
{{else}}
|
||||||
|
build {{build.number}} failed. Fix me please.
|
||||||
|
{{/success}}
|
||||||
|
when:
|
||||||
|
status: [success, failure]
|
||||||
|
|
||||||
|
- name: Confirm-Build
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- ls -al build
|
||||||
|
- echo "Build is mint!"
|
||||||
|
depends_on:
|
||||||
|
- Build
|
||||||
|
- Test-Debian
|
||||||
|
|
||||||
|
- name: Release
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: FORGEJO_TOKEN
|
||||||
|
base_url: https://git.xyro.win
|
||||||
|
repo_owner: nyosic
|
||||||
|
repo_name: MarioDB
|
||||||
|
files: build/main
|
||||||
|
depends_on:
|
||||||
|
- Confirm-Build
|
||||||
|
when:
|
||||||
|
event: tag
|
14
main.cpp
14
main.cpp
|
@ -2,28 +2,24 @@
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
int i,n;
|
int i, n;
|
||||||
float suma;
|
float suma;
|
||||||
int f[100], f0, f1;
|
int f0 = 0, f1 = 1;
|
||||||
float zl;
|
float zl;
|
||||||
|
|
||||||
|
|
||||||
cout << "N = ";
|
cout << "N = ";
|
||||||
cin >> n;
|
cin >> n;
|
||||||
f0 = 0;
|
|
||||||
f1 = 1;
|
|
||||||
cout << f0 << " " << f1 << " ";
|
cout << f0 << " " << f1 << " ";
|
||||||
for(i = 2;i<=n;i++) {
|
|
||||||
|
for (i = 2; i <= n; i++) {
|
||||||
suma = f0 + f1;
|
suma = f0 + f1;
|
||||||
cout << suma << " ";
|
cout << suma << " ";
|
||||||
f0 = f1;
|
f0 = f1;
|
||||||
f1 = suma;
|
f1 = suma;
|
||||||
}
|
}
|
||||||
|
|
||||||
zl = suma/f0;
|
zl = suma / f0;
|
||||||
|
|
||||||
cout << "\nZlota liczba = " << zl << endl;
|
cout << "\nZlota liczba = " << zl << endl;
|
||||||
|
|
||||||
system("pause");
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue