Skip to content

Commit

Permalink
Update build workflow to use build-n-upload-action
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvapiav committed Mar 15, 2024
1 parent 53bb581 commit c1f0f95
Showing 1 changed file with 46 additions and 33 deletions.
79 changes: 46 additions & 33 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,52 @@ permissions:
contents: read

jobs:
hello_world_job:
runs-on: ubuntu-latest
name: A job to say hello
steps:
- name: Hello world action step
id: hello
uses: actions/build-n-upload-action@v1
with:
who-to-greet: 'Mona the Octocat'
# Use the output from the `hello` step
- name: Get the output time
run: echo "The time was ${{ steps.hello.outputs.time }}"

build-yml-check:
uses: ./.github/workflows/build-yml-check.yml

build_matrix:
name: "build"
needs: [build-yml-check]
runs-on: [self-hosted, nixbuilder]
timeout-minutes: 360
strategy:
matrix:
include:
- arch: x86_64-linux
target: fmo-os-installer-debug
if: |
always() &&
(1 || needs.build-yml-check.outputs.result == 'not-changed')
concurrency:
# Cancel any in-progress workflow runs from the same PR or branch,
# allowing matrix jobs to run concurrently:
group: ${{ github.workflow }}.${{ github.event.pull_request.number || github.ref }}.${{ matrix.arch }}.${{ matrix.target }}
cancel-in-progress: true
steps:
- name: Print runner system info
run: sudo apt-get update; sudo apt-get install -y inxi; sudo inxi -c0 --width -1 --basic --memory-short
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.ref }}
- name: Install nix
uses: cachix/install-nix-action@v24
with:
extra_nix_config: |
system-features = nixos-test benchmark big-parallel kvm
- name: Build ${{ matrix.arch }}.${{ matrix.target }}
run: |
nix build .#packages.${{ matrix.arch }}.${{ matrix.target }}
# build_matrix:
# name: "build"
# needs: [build-yml-check]
# runs-on: [self-hosted, nixbuilder]
# timeout-minutes: 360
# strategy:
# matrix:
# include:
# - arch: x86_64-linux
# target: fmo-os-installer-debug
# if: |
# always() &&
# (1 || needs.build-yml-check.outputs.result == 'not-changed')
# concurrency:
# # Cancel any in-progress workflow runs from the same PR or branch,
# # allowing matrix jobs to run concurrently:
# group: ${{ github.workflow }}.${{ github.event.pull_request.number || github.ref }}.${{ matrix.arch }}.${{ matrix.target }}
# cancel-in-progress: true
# steps:
# - name: Print runner system info
# run: sudo apt-get update; sudo apt-get install -y inxi; sudo inxi -c0 --width -1 --basic --memory-short
# - name: Checkout
# uses: actions/checkout@v4
# with:
# ref: ${{ github.event.pull_request.head.sha || github.ref }}
# - name: Install nix
# uses: cachix/install-nix-action@v24
# with:
# extra_nix_config: |
# system-features = nixos-test benchmark big-parallel kvm
# - name: Build ${{ matrix.arch }}.${{ matrix.target }}
# run: |
# nix build .#packages.${{ matrix.arch }}.${{ matrix.target }}

0 comments on commit c1f0f95

Please sign in to comment.