forked from testg/test_repo
Compare commits
1 Commits
v1.0
...
a101211279
Author | SHA1 | Date | |
---|---|---|---|
3bb203343c |
18
.drone.yml
18
.drone.yml
@@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
kind: pipeline
|
|
||||||
type: docker
|
|
||||||
name: build_linux_test
|
|
||||||
|
|
||||||
trigger:
|
|
||||||
event:
|
|
||||||
- pull_request
|
|
||||||
- push
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: build_test
|
|
||||||
image: gcc
|
|
||||||
commands:
|
|
||||||
- echo "start test"
|
|
||||||
- gcc main.c -o test
|
|
||||||
- ./test
|
|
||||||
|
|
23
main.c
23
main.c
@@ -1,23 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int add(int a, int b);
|
|
||||||
|
|
||||||
int main(int argc, char** argv)
|
|
||||||
{
|
|
||||||
int i;
|
|
||||||
printf("hello word!\n");
|
|
||||||
if (argc > 1)
|
|
||||||
{
|
|
||||||
for(i = 0; i < argc; i++)
|
|
||||||
{
|
|
||||||
printf("argv[%2d] = %s\n",i,argv[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
printf("add 1 + 2 = %d \n", add(1,2));
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int add(int a, int b)
|
|
||||||
{
|
|
||||||
return a + b;
|
|
||||||
}
|
|
Reference in New Issue
Block a user