Skip to content

Commit

Permalink
ci: add build job (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
c-dilks authored Nov 13, 2023
1 parent 216164a commit 25784c1
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
71 changes: 71 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Linux

on:
pull_request:
push:
branches: [ main ]
tags: [ '*' ]

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

defaults:
run:
shell: bash

jobs:

build_hipo:
name: Build HIPO
runs-on: ubuntu-latest
steps:
- name: checkout hipo
uses: actions/checkout@v4
with:
repository: gavalian/hipo
- name: build
run: |
cmake -S . -B build -DCMAKE_INSTALL_PREFIX=hipo
cmake --build build -j2
cmake --install build
- run: tree hipo
- name: tar
run: tar czvf hipo{.tar.gz,}
- uses: actions/upload-artifact@v3
with:
name: build
retention-days: 1
path: ./*.tar.gz

build_iguana:
name: Build iguana
needs: [ build_hipo ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup fmt
run: sudo apt install -y libfmt-dev
- name: setup meson
run: python -m pip install meson ninja
- name: summarize dependencies
run: |
echo '### Dependencies' >> $GITHUB_STEP_SUMMARY
echo '| Dependency | Version |' >> $GITHUB_STEP_SUMMARY
echo '| --- | --- |' >> $GITHUB_STEP_SUMMARY
for dep in python ruby meson ninja ; do
echo "| \`$dep\` | $($dep --version) |" >> $GITHUB_STEP_SUMMARY
done
echo "| \`fmt\` | $(apt show libfmt-dev | grep -w Version) |" >> $GITHUB_STEP_SUMMARY
- name: get build artifacts
uses: actions/download-artifact@v3
with:
name: build
- name: untar build
run: ls *.tar.gz | xargs -I{} tar xzvf {}
- name: build iguana
run: ./install.rb --hipo hipo
- name: dump build log
if: always()
run: cat build-iguana/meson-logs/meson-log.txt
- run: tree iguana
1 change: 1 addition & 0 deletions install.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

# check for HIPO installation, or fallback to $HIPO
options[:hipo] = ENV['HIPO'] unless Dir.exists? options[:hipo]
options[:hipo] = File.realpath options[:hipo] if Dir.exists? options[:hipo]

# clean and purge
def rmDir(dir,obj='files')
Expand Down

0 comments on commit 25784c1

Please sign in to comment.