Update ubuntu.yml #469
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test on Ubuntu | |
on: | |
push: | |
branches: [ "master", "devel", "citest" ] | |
tags: | |
- '**' | |
pull_request: | |
branches: [ "master", "devel" ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: install prereq. | |
run: | |
sudo apt-get update && | |
sudo apt-get install -y fpc | |
- name: build | |
run: | |
mkdir build | |
make | |
- name: list build binaries | |
run: ls -l build/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mp-bin-ubuntu | |
path: | | |
build/ | |
build-mads: | |
runs-on: ubuntu-latest | |
steps: | |
- name: install prereq. | |
run: | |
sudo apt-get update && | |
sudo apt-get install -y fpc | |
- name: get sources | |
run: git clone https://github.com/tebe6502/Mad-Assembler.git | |
- name: build | |
run: cd Mad-Assembler ; fpc -Mdelphi -vh -O3 mads.pas | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: mads-bin-ubuntu | |
path: | | |
Mad-Assembler/mads | |
test: | |
needs: [ build, build-mads ] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
name: mp-bin-ubuntu | |
path: build | |
- uses: actions/download-artifact@v4 | |
with: | |
name: mads-bin-ubuntu | |
path: mads | |
- name: install mads | |
run: sudo cp -v mads/mads /usr/local/bin/mads | |
- name: set permissions | |
run: sudo chmod a+x build/mp /usr/local/bin/mads | |
- name: list binaries from the artifacts | |
run: ls -l build/ mads/ /usr/local/bin/mads | |
- name: setup test environment | |
run: make test-setup | |
- name: run tests | |
run: make test | |
- name: list all files | |
run: find . | |
- name: store logs from failed tests | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: mp-failed-test-logs | |
path: | | |
test/test_temp/* | |
test/*.log |