Skip to content

Commit

Permalink
build everything in the RUNNER_TEMP
Browse files Browse the repository at this point in the history
  • Loading branch information
iliabylich committed May 30, 2022
1 parent 6fe6c23 commit 5da0ad2
Showing 1 changed file with 48 additions and 18 deletions.
66 changes: 48 additions & 18 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,53 +12,83 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: set env
- name: get version
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV

- name: create bison dir
run: |
sudo mkdir /bison-$RELEASE_VERSION
sudo chown runner:docker /bison-$RELEASE_VERSION
cd /bison-$RELEASE_VERSION
- name: download bison
run: |
export BISON_URL="http://ftp.gnu.org/gnu/bison/bison-$RELEASE_VERSION.tar.gz"
cd /bison-$RELEASE_VERSION
export BISON_URL=http://ftp.gnu.org/gnu/bison/bison-$RELEASE_VERSION.tar.gz
echo $BISON_URL
wget $BISON_URL -O bison.tar.gz
wget -q $BISON_URL -O bison.tar.gz
- name: untar
run: tar -xvf bison.tar.gz && ls -la

- name: move everything to current dir
run: cd "bison-$RELEASE_VERSION" && mv * ..
run: |
cd /bison-$RELEASE_VERSION
tar -xvf bison.tar.gz
mv bison-$RELEASE_VERSION src
ls -l
ls -l src/
- name: print info
run: cat README && cat INSTALL
run: |
cd /bison-$RELEASE_VERSION/src
cat INSTALL
- name: configure
run: mkdir build && ./configure --prefix="$PWD/build"
run: |
cd /bison-$RELEASE_VERSION/src
./configure --prefix=/bison-$RELEASE_VERSION
- name: make
run: make
run: |
cd /bison-$RELEASE_VERSION/src
make
- name: make check
run: make check
# - name: make check
# run: |
# cd /bison-$RELEASE_VERSION/src
# make check

- name: make install
run: make install
run: |
cd /bison-$RELEASE_VERSION/src
make install
- name: delete src files
run: |
rm /bison-$RELEASE_VERSION/bison.tar.gz
rm -r /bison-$RELEASE_VERSION/src
- name: show compiled build
run: find build
run: |
cd /bison-$RELEASE_VERSION
find .
- name: print build info
run: ./build/bin/bison --version && ./build/bin/bison --help
run: /bison-$RELEASE_VERSION/bin/bison --version

- name: tar compiled build
run: cd build && tar -czvf "bison-$RELEASE_VERSION.tar.gz" *
run: |
cd /bison-$RELEASE_VERSION
tar -czvf bison-$RELEASE_VERSION.tar.gz *
cd $GITHUB_WORKSPACE
mv /bison-$RELEASE_VERSION/bison-$RELEASE_VERSION.tar.gz .
- name: check tar archive
run: tar -ztvf "build/bison-$RELEASE_VERSION.tar.gz"
run: tar -ztvf bison-$RELEASE_VERSION.tar.gz

- name: release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifactErrorsFailBuild: true
artifacts: "build/*.tar.gz"
artifacts: "*.tar.gz"
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 5da0ad2

Please sign in to comment.