Skip to content

Commit

Permalink
Adding release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kengorab committed Oct 21, 2024
1 parent 580140a commit 8e2d34c
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 1 deletion.
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
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"
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ jobs:
echo "PATH=$(pwd)/qbe/qbe-1.2:$PATH" >> $GITHUB_ENV
- name: Build rust
run: cargo build
- name: Install ext dependencies (for C compilation)
- name: Install ext dependencies
run: ./configure-libgc.sh
- name: Run rust tests
run: TEST_TMP_DIR=${{ runner.temp }} cargo test --verbose
Expand Down

0 comments on commit 8e2d34c

Please sign in to comment.