diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml new file mode 100644 index 0000000..aa54919 --- /dev/null +++ b/.semaphore/semaphore.yml @@ -0,0 +1,42 @@ +version: v1.0 +name: Initial Pipeline +agent: + machine: + type: e1-standard-2 + os_image: ubuntu2004 +blocks: + - name: Reverse + task: + jobs: + - name: 'Job #1' + commands: + - bash -x bg-f < in.txt | tee out.txt + - '[ "$(rev in.txt)" = "$(cat out.txt)" ]' + parallelism: 4 + - name: 'Job #2' + commands: + - rev in.txt | bash -x bg-f | tee out.txt + - '[ "$(cat in.txt)" = "$(cat out.txt)" ]' + parallelism: 4 + prologue: + commands: + - checkout + - sed examples/reverse.bgn -e 's/STRGET forever/STRGET forever\nALLOW_UNDEF\nCONST_WRITE anuc forever/' -e 's/<>//' | tee reverse_one.bgn + - ./bashgenn reverse_one.bgn + - openssl rand -base64 256 | sed -z 's/\n//g' | tee in.txt + - echo >> in.txt + run: + when: change_in('/bashgenn') OR change_in('/examples/') + dependencies: [] + - name: 'Hello, World!' + dependencies: [] + task: + prologue: + commands: + - checkout + - ./bashgenn examples/hello_world.bgn + jobs: + - name: 'Job #1' + commands: + - bash -x bg-f > out.txt + - '[ "$(cat out.txt)" = "Hello World!" ]'