Skip to content

[workflows] Update GitHub actions to use modern tools #77

[workflows] Update GitHub actions to use modern tools

[workflows] Update GitHub actions to use modern tools #77

name: Build and test Flang
on:
pull_request:
branches:
- 'release_*x'
jobs:
build:
runs-on: self-hosted
env:
build_path: /home/github
install_prefix: /home/github/usr/local
container:
image: ghcr.io/${{ github.repository_owner}}/ubuntu-flang-${{ github.base_ref }}:latest
credentials:
username: github
strategy:
matrix:
target: AArch64

Check failure on line 20 in .github/workflows/flang-arm64-tests.yml

View workflow run for this annotation

GitHub Actions / Build and test Flang

Invalid workflow file

The workflow is not valid. .github/workflows/flang-arm64-tests.yml (Line: 20, Col: 17): Unexpected value 'AArch64' .github/workflows/flang-arm64-tests.yml (Line: 21, Col: 13): Unexpected value 'clang'
cc: clang
cpp: clang++
version: [14, 15]
include:
- target: AArch64
cc: gcc
cpp: g++
version: [11, 12]
steps:
- name: Check tools
run: |
git --version
cmake --version
make --version
${{ matrix.cc }}-${{ matrix.version }} --version
${{ matrix.cpp }}-${{ matrix.version }} --version
- name: Manual checkout to build in user's home dir (pull_request)
run: |
cd ${{ env.build_path }}
git clone https://github.com/flang-compiler/classic-flang-llvm-project.git
cd classic-flang-llvm-project
git fetch origin ${{github.ref}}:pr_branch
git checkout pr_branch
- name: Build and install llvm
run: |
cd ${{ env.build_path }}/classic-flang-llvm-project
./build-llvm-project.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -a /usr/bin/${{ matrix.cc }}-${{ matrix.version }} -b /usr/bin/${{ matrix.cpp }}-${{ matrix.version }} -n $(nproc) -i -x "-DLLVM_ENABLE_ASSERTIONS=ON" -v
- name: Checkout flang
run: |
cd ${{ env.build_path }}
git clone --depth 1 --single-branch --branch master https://github.com/flang-compiler/flang.git
- name: Build and install libpgmath & flang
run: |
cd ${{ env.build_path }}/flang
./build-flang.sh -t ${{ matrix.target }} -p ${{ env.install_prefix }} -n $(nproc) -l ${{ env.build_path }}/classic-flang-llvm-project/llvm
- name: Copy llvm-lit
run: |
cd ${{ env.build_path }}/flang
cp ${{ env.build_path }}/classic-flang-llvm-project/build/bin/llvm-lit build/flang/bin/
- name: Test flang
run: |
cd ${{ env.build_path }}/flang/build/flang
make check-all