Recent

Author Topic: GitHub action setup-lazarus  (Read 1917 times)

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1120
  • Professional amateur ;-P
GitHub action setup-lazarus
« on: June 03, 2022, 12:01:08 am »
Hey Y'all,

Since I've finally unstuck my thumbs outta my arse, and implemented the full set of features I wanted, I'm now announcing the GitHub action to install Lazarus so you can have CI/CD (Continuous Integration / Continuous Delivery) with your Lazarus projects.

Features so far:
  • Will install the Lazarus/FPC bundle from source forge with the version number of Lazarus
  • Will install packages, and dependencies, of packages from Online Package Manager's(OPM) site https://packages.lazarus-ide.org/
  • With the use of the option with-cache it will no longer download the install archive from source forge, but will use the last one downloaded and cached.
    NOTE: At the moment this is somewhat broken for Windows. The install executable appear to not like being retrieved from cached.

Edit
I completely forgot to mention that there's a companion repository named lazarus-with-github-actions where I test the action itself.
You can have a looksie there, to get an idea on how to get your project up and running.

I hope this will help many of you.

Cheers,
Gus

P.S.: If you'd like a bit more control on what bundles and/or versions to install I suggest using Olly's version, also called setup-lazarus and also with cache.
« Last Edit: June 03, 2022, 09:31:19 am by Gustavo 'Gus' Carreno »
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

Red_prig

  • Full Member
  • ***
  • Posts: 143
Re: GitHub action setup-lazarus
« Reply #1 on: June 03, 2022, 08:37:44 am »
Not so long ago, I understood this topic, and set up a self-hosted, I got something like this:
Code: Text  [Select][+][-]
  1. # This is a basic workflow to help you get started with Actions
  2.  
  3. name: CI
  4.  
  5. # Controls when the workflow will run
  6. on:
  7.   # Triggers the workflow on push or pull request events but only for the main branch
  8.   push:
  9.     branches: [ main ]
  10.     tags:        
  11.       - '*'
  12.   pull_request:
  13.     branches: [ main ]
  14.  
  15.   # Allows you to run this workflow manually from the Actions tab
  16.   workflow_dispatch:
  17.  
  18. # A workflow run is made up of one or more jobs that can run sequentially or in parallel
  19. jobs:
  20.   build_windows:
  21.     # The type of runner that the job will run on
  22.     runs-on: self-hosted
  23.  
  24.     # Steps represent a sequence of tasks that will be executed as part of the job
  25.     steps:
  26.       # Runs a set of commands using the runners shell
  27.       - uses: actions/checkout@v2
  28.       - name: Compile
  29.         shell: cmd
  30.         working-directory: ./fpPS4/spirv
  31.         run: lazbuild -B pssl-spirv.lpi
  32.       - name: Strip
  33.         shell: cmd
  34.         working-directory: ./fpPS4/spirv
  35.         if: startsWith(github.ref, 'refs/tags/')
  36.         run: strip pssl-spirv.exe
  37.       - name: Release
  38.         uses: softprops/action-gh-release@v1
  39.         if: startsWith(github.ref, 'refs/tags/')
  40.         with:
  41.           files: ./fpPS4/spirv/pssl-spirv.exe

friend

  • Guest
Re: GitHub action setup-lazarus
« Reply #2 on: June 03, 2022, 09:20:15 am »
Since I've finally unstuck my thumbs outta my ...

surprising, .....
what does this do?
« Last Edit: June 03, 2022, 02:06:03 pm by Martin_fr »

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1120
  • Professional amateur ;-P
Re: GitHub action setup-lazarus
« Reply #3 on: June 03, 2022, 09:34:42 am »
Hey Red_prig,

Not so long ago, I understood this topic, and set up a self-hosted, I got something like this:

I really don't know anything about setting up a self hosted runner, sorry.

I've added an addendum to the original post mentioning the companion repository lazarus-with-github-actions where you can get an idea on how to use the action.

Hope this helps.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1120
  • Professional amateur ;-P
Re: GitHub action setup-lazarus
« Reply #4 on: June 03, 2022, 09:41:53 am »
Hey friend,

surprising, usually people who say "y'all" outside that particular region in the united states and who are not part of that certain group of people from that region as well, who use sh*thub, put em*jis in documentation, use continuous retardation, tend to like sticking all kinds of things up there, good for you you've stuck it out, seems like a good thing for you since you've mentioned it.
what does this do?

  • First of all, I'm not really liking your tone.
  • I'm Portuguese, so I'm not from any US region.
  • I use the colloquialism Y'all so I don't have to fall into the trap of using any gender.
  • If you don't know what is Continuous Integration / Continuous Deployment (CI/CD), then this is of no interest for you, so run along please.
  • What I do with my arse and what I stick up there is none of your business and you should not have an opinion about it.
  • And the use of emojis is something I quite like, so agree to disagree on this one!

Nuff, said, peace out.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

dbannon

  • Hero Member
  • *****
  • Posts: 2794
    • tomboy-ng, a rewrite of the classic Tomboy
Re: GitHub action setup-lazarus
« Reply #5 on: June 03, 2022, 09:58:47 am »
Hey Gus (and Y'All) thats nice work.

I am, perhaps, not yet ready to give up my ugly bash scripts and a VM full of cross compilers but tempted...

Thanks.

Davo
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: GitHub action setup-lazarus
« Reply #6 on: June 03, 2022, 02:11:57 pm »

Edited: removed a tirade that was good for nothing but starting a "flame war".
Deleted a 2nd message with the same potential.

@friend: pay more attention to staying on topic: constructive, non-abusive content about Pascal. (final warning)
(for replies to the moderation-team, please use the "report to moderator")

friend

  • Guest
Re: GitHub action setup-lazarus
« Reply #7 on: June 03, 2022, 03:10:56 pm »
@friend: pay more attention to staying on topic: constructive, non-abusive content about Pascal. (final warning)

Sorry friend. Maintaining composure in the face of r*tardation, f*ggotry, usw., is not something I'm good at, you see. Please don't let this be the final warning. Please remove these shackles, I did nothing wrong to friends. :(

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: GitHub action setup-lazarus
« Reply #8 on: June 03, 2022, 03:59:40 pm »
Sorry friend. Maintaining composure in the face of r*tardation, f*ggotry, usw., is not something I'm good at,

Asterisks or not, insulting those with whom you conversed is exactly what you were asked not to do.
Good bye.

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1120
  • Professional amateur ;-P
Re: GitHub action setup-lazarus
« Reply #9 on: June 03, 2022, 08:12:10 pm »
Hey Davo,

Hey Gus (and Y'All) thats nice work.

Thank you very much!!

I am, perhaps, not yet ready to give up my ugly bash scripts and a VM full of cross compilers but tempted...

Yes, I completely understand. And to be honest, my next plan is to use fpcup and fpclazup in probably another action to get cross compiling working for ARM under ubuntu-latest runners.
But that's another battle to be fought at some other time.

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1120
  • Professional amateur ;-P
Re: GitHub action setup-lazarus
« Reply #10 on: June 03, 2022, 08:15:09 pm »
Hey Martin,

Edited: removed a tirade that was good for nothing but starting a "flame war".
Deleted a 2nd message with the same potential.

Thanks mate for slapping my hand!!
Sometimes my mouth/fingers lack the fortitude to just shut up and ignore the trolls :(

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 9867
  • Debugger - SynEdit - and more
    • wiki
Re: GitHub action setup-lazarus
« Reply #11 on: June 03, 2022, 08:58:30 pm »
Hey Martin,

Edited: removed a tirade that was good for nothing but starting a "flame war".
Deleted a 2nd message with the same potential.

Thanks mate for slapping my hand!!
Sometimes my mouth/fingers lack the fortitude to just shut up and ignore the trolls :(

This wasn't about any reply/post of yours. They were all fine as far as I am concerned.
"friend" had two messages. I would have deleted both. But one of them had replies. So to keep clarity, and not to leave those replies out of context, I decided to edit that one post.

Anyway lets put that behind us, and get back on topic.


Gustavo 'Gus' Carreno

  • Hero Member
  • *****
  • Posts: 1120
  • Professional amateur ;-P
Re: GitHub action setup-lazarus
« Reply #12 on: June 03, 2022, 10:34:45 pm »
Hey Martin,

This wasn't about any reply/post of yours. They were all fine as far as I am concerned.
"friend" had two messages. I would have deleted both. But one of them had replies. So to keep clarity, and not to leave those replies out of context, I decided to edit that one post.

Sorry, my bad, when I read you deleted 2 messages I thought one of them was mine, since I did reply to his bile.
I just scrolled up a bit and found out my messages where still there, so I must apologise for the confusion.

Anyway lets put that behind us, and get back on topic.

Couldn't agree more, so yeah, let's do that!!

And thanks for keeping a vigilant eye on such caustic behaviours :)

Cheers,
Gus
Lazarus 3.99(main) FPC 3.3.1(main) Ubuntu 23.10 64b Dark Theme
Lazarus 3.0.0(stable) FPC 3.2.2(stable) Ubuntu 23.10 64b Dark Theme
http://github.com/gcarreno

 

TinyPortal © 2005-2018