tutorial:githubactions

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:githubactions [2021/12/11 23:54]
iridescence
tutorial:githubactions [2021/12/15 17:04]
iridescence
Line 11: Line 11:
 To add actions, browse to your repository, and in the main bar alongside other things like Issues or Pull Requests, you should see an "Actions" tab. To add your actions, you should use a custom action for simplicity. You will be brought to an editor where you can make changes to your YML file. To add actions, browse to your repository, and in the main bar alongside other things like Issues or Pull Requests, you should see an "Actions" tab. To add your actions, you should use a custom action for simplicity. You will be brought to an editor where you can make changes to your YML file.
  
-For your PSP build, you should run on ubuntu-latest and use the PSPDEV docker container. 
  
-Here is a sample YML+ 
 +==== C/C++ ==== 
 +For your PSP build, you should run on ubuntu-latest and use the PSPDEV docker container.
  
 <code> <code>
Line 40: Line 41:
         # For this example, we're just running make         # For this example, we're just running make
           make           make
-      - name: Publish artifacts 
 </code> </code>
  
 Once you submit this file you should be set up for your PSP repository to be compiled automatically on commit and pull requests! Once you submit this file you should be set up for your PSP repository to be compiled automatically on commit and pull requests!
 +
 +==== Rust ====
 +
 +Here's a sample for compiling in Rust-PSP for Github Actions!
 +
 +<code>
 +name: Rust-PSP
 +
 +on:
 +  push:
 +    branches: [ master ]
 +  pull_request:
 +    branches: [ master ]
 +  workflow_dispatch:
 +
 +jobs:
 +  build:
 +    runs-on: ubuntu-latest
 +
 +    steps:
 +      - name: Checkout
 +        uses: actions/checkout@v2
 +        
 +      - name: Install toolchain
 +        uses: actions-rs/toolchain@v1
 +        with:
 +          profile: default
 +          toolchain: nightly
 +          override: true
 +          components: rust-src
 +      
 +      - name: Install PSP
 +        uses: actions-rs/cargo@v1
 +        with:
 +          command: install
 +          args: cargo-psp
 +      
 +      - name: Build
 +        uses: actions-rs/cargo@v1
 +        with:
 +          command: psp
 +</code>
 +
 +==== Zig ====
 +
 +Here's a sample with Zig-PSP!
 +
 +<code>
 +name: Zig-PSP
 +
 +on:
 +  push:
 +    branches: [ master ]
 +  pull_request:
 +    branches: [ master ]
 +
 +  workflow_dispatch:
 +
 +jobs:
 +  build:
 +    runs-on: ubuntu-latest
 +
 +    steps:
 +      - name: Checkout
 +        uses: actions/checkout@v2
 +        
 +      - name: Install Zig
 +        uses: nektro/actions-setup-zig@v1
 +      
 +      - name: Build
 +        run: zig build
 +</code>
  • tutorial/githubactions.txt
  • Last modified: 2021/12/15 17:04
  • by iridescence