-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace CircleCI with GitHub Action.
- Loading branch information
Showing
7 changed files
with
322 additions
and
151 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
name: Build binaries | ||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
fail-fast: false | ||
matrix: # Build debug and production | ||
os: [ubuntu-18.04, windows-latest] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: 'git config' | ||
run: git config --global core.autocrlf input | ||
shell: bash | ||
|
||
- name: Get gnat-llvm | ||
uses: actions/checkout@v2 | ||
if: ${{ runner.os != 'Windows' }} | ||
with: | ||
repository: AdaCore/gnat-llvm | ||
ref: 'e3f56dce0df148c5f27e97d973cfbdc1bd72248f' | ||
path: gnat-llvm | ||
|
||
- name: Get bb-runtimes | ||
uses: actions/checkout@v2 | ||
if: ${{ runner.os != 'Windows' }} | ||
with: | ||
repository: Fabien-Chouteau/bb-runtimes | ||
path: gnat-llvm/llvm-interface/bb-runtimes | ||
ref: 'gnat-fsf-11' | ||
|
||
- name: Get gcc | ||
uses: actions/checkout@v2 | ||
if: ${{ runner.os != 'Windows' }} | ||
with: | ||
repository: gcc-mirror/gcc | ||
path: gnat-llvm/llvm-interface/gcc | ||
ref: 'e078de24eae8253fd4f24342f65166b525dd99c6' | ||
|
||
- name: Get AdaWebPack | ||
uses: actions/checkout@v2 | ||
with: | ||
path: gnat-llvm/llvm-interface/adawebpack_src | ||
|
||
- name: Get GNAT toolchain with alire | ||
uses: alire-project/setup-alire@v1 | ||
if: ${{ runner.os != 'Windows' }} | ||
with: | ||
toolchain: gnat_native^11 gprbuild^21 | ||
toolchain_dir: ./cached_gnat | ||
|
||
- name: Fetch LLVM | ||
if: ${{ runner.os != 'Windows' }} | ||
run: | | ||
URL=https://github.com/llvm/llvm-project/releases/download/llvmorg-13.0.0 | ||
curl -L $URL/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-16.04.tar.xz \ | ||
| tar xJf - | ||
- name: Build (Linux) | ||
if: ${{ runner.os != 'Windows' }} | ||
run: | | ||
export PREFIX=$PWD/adawebpack | ||
export PATH=$PWD/gnat-llvm/llvm-interface/bin:$PATH | ||
export PATH=`ls -d $PWD/cached_gnat/*/bin |tr '\n' ':'`$PATH | ||
export PATH=$PWD/clang+llvm-13.0.0-x86_64-linux-gnu-ubuntu-16.04/bin:$PATH | ||
echo PATH=$PATH | ||
pwd | ||
ls -l | ||
ls -l gnat-llvm/llvm-interface/ | ||
cd gnat-llvm/llvm-interface | ||
ln -sv gcc/gcc/ada gnat_src | ||
ln -sv adawebpack_src/source/rtl/Makefile.target | ||
ln -sv bb-runtimes/gnat_rts_sources/include/rts-sources | ||
make wasm | ||
make -C adawebpack_src build_examples | ||
set -x | ||
chrpath -d bin/* | ||
mkdir -p ${PREFIX}/share/gprconfig | ||
mkdir -p ${PREFIX}/lib/gnat | ||
mkdir -p ${PREFIX}/share/adawebpack | ||
cp adawebpack_src/packages/Fedora/llvm.xml ${PREFIX}/share/gprconfig/ | ||
cp adawebpack_src/gnat/adawebpack_config.gpr ${PREFIX}/lib/gnat/ | ||
cp -r bin lib ${PREFIX} | ||
cp -v adawebpack_src/source/adawebpack.mjs ${PREFIX}/share/adawebpack/ | ||
gprconfig --batch -o /tmp/llvm.cgpr --db `pwd`/adawebpack_src/packages/Fedora --target=llvm --config=ada,, | ||
gprbuild --target=llvm -P adawebpack_src/gnat/adawebpack.gpr -p --config=/tmp/llvm.cgpr | ||
gprinstall --target=llvm --prefix=${PREFIX} --project-subdir=${PREFIX}/lib/gnat -P adawebpack_src/gnat/adawebpack.gpr -p --config=/tmp/llvm.cgpr | ||
cd `dirname ${PREFIX}` | ||
tar czf ${PREFIX}.tar.gz `basename ${PREFIX}` | ||
- name: Setup MSYS2 | ||
if: ${{ runner.os == 'Windows' }} | ||
uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: mingw64 | ||
install: | | ||
base-devel | ||
mingw-w64-x86_64-toolchain | ||
mingw-w64-x86_64-gcc-ada | ||
mingw-w64-x86_64-gprbuild | ||
mingw-w64-x86_64-clang | ||
mingw-w64-x86_64-lld | ||
- name: Build MSYS2 package | ||
if: ${{ runner.os == 'Windows' }} | ||
shell: msys2 {0} | ||
run: | | ||
mv gnat-llvm/llvm-interface/adawebpack_src adawebpack | ||
cp -r adawebpack/packages/msys2 . | ||
tar czf msys2/adawebpack.tar.gz adawebpack | ||
cd msys2 | ||
makepkg-mingw --noconfirm --noprogressbar -sCLf | ||
mv -v *.tar.zst .. | ||
- name: Keep archive in artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ runner.os }} | ||
path: "*.tar.*" | ||
|
Oops, something went wrong.