-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
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,73 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v[0-9]+.[0-9]+.[0-9]+' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v2 | ||
- name: Cache Cargo | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
- name: Cache LLVM | ||
id: cache-llvm | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./llvm | ||
key: llvm-11.1.0 | ||
- name: Cache QBE | ||
id: cache-qbe | ||
uses: actions/cache@v3 | ||
with: | ||
path: ./qbe/qbe-1.2 | ||
key: qbe-1.2 | ||
- name: Install LLVM (11.1.0) | ||
run: | | ||
mkdir -p llvm | ||
curl -L "https://github.com/llvm/llvm-project/releases/download/llvmorg-11.1.0/clang+llvm-11.1.0-x86_64-linux-gnu-ubuntu-20.10.tar.xz" > llvm.tar.xz | ||
tar x --xz -C llvm --strip-components=1 -f llvm.tar.xz | ||
if: steps.cache-llvm.outputs.cache-hit != 'true' | ||
- name: Setup LLVM | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y libtinfo6 | ||
echo "PATH=$(pwd)/llvm/bin:$PATH" >> $GITHUB_ENV | ||
echo "LLVM_CONFIG=$(pwd)/llvm/bin/llvm-config" >> $GITHUB_ENV | ||
- name: Install QBE | ||
run: | | ||
mkdir -p qbe | ||
cd qbe | ||
wget https://c9x.me/compile/release/qbe-1.2.tar.xz | ||
tar -xf qbe-1.2.tar.xz | ||
cd qbe-1.2 | ||
make | ||
if: steps.cache-qbe.outputs.cache-hit != 'true' | ||
- name: Setup QBE | ||
run: | | ||
ls -la ./qbe | ||
ls -la ./qbe/qbe-1.2 | ||
echo "PATH=$(pwd)/qbe/qbe-1.2:$PATH" >> $GITHUB_ENV | ||
- name: Build reference compiler | ||
run: cargo build | ||
- name: Install ext dependencies | ||
run: ./configure-libgc.sh | ||
- name: Build selfhosted compiler | ||
run: | | ||
cd selfhost | ||
./abra build -o compiler ./src/compiler.test.abra | ||
cp ./._abra/compiler "./abra-${{ github.ref_name }}-linux" | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
files: | ||
"selfhost/abra-${{ github.ref_name }}-linux" |
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