forked from riscv-software-src/riscv-isa-sim
-
Notifications
You must be signed in to change notification settings - Fork 4
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
5 changed files
with
93 additions
and
0 deletions.
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
autoconf | ||
mkdir build; cd build | ||
../configure | ||
make |
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,22 @@ | ||
#!/usr/bin/env bash | ||
|
||
export filename="Dockerfile" | ||
rm -f $filename | ||
touch $filename | ||
|
||
echo "FROM $full_tgtname" >> $filename | ||
echo >> $filename | ||
if [ $(echo $full_tgtname | cut -d ':' -f 1) = "ubuntu" ]; then | ||
echo 'RUN apt update && apt -y install build-essential curl device-tree-compiler' >> $filename | ||
fi | ||
if [ $(echo $full_tgtname | cut -d ':' -f 1) = "almalinux" ]; then | ||
if [ $(echo $full_tgtname | cut -d ':' -f 2 | cut -d '.' -f 1) = '8' ]; then | ||
echo 'RUN rpm --import https://repo.almalinux.org/almalinux/RPM-GPG-KEY-AlmaLinux' >> $filename | ||
fi | ||
echo 'RUN dnf -y update && dnf -y group install "Development Tools"' >> $filename | ||
echo 'RUN dnf config-manager --add-repo /etc/yum.repos.d/almalinux-powertools.repo' >> $filename | ||
echo 'RUN dnf config-manager --set-enabled powertools' >> $filename | ||
echo 'RUN dnf -y install dtc' >> $filename | ||
fi | ||
echo >> $filename | ||
echo 'WORKDIR /source' >> $filename |
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,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [[ "$GITHUB_REF" =~ ^refs/tags/snitch-v.*$ ]]; then | ||
readonly pkgver="$(echo $GITHUB_REF | sed -n 's/^refs\/tags\/snitch-v//p')" | ||
else | ||
echo "Github reference does not match Snitch version tag pattern" | ||
exit 1 | ||
fi | ||
|
||
tar -czf "snitch-spike-dasm-$pkgver-x86_64-linux-gnu-$1.tar.gz" \ | ||
--owner=0 --group=0 build/spike-dasm |
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,53 @@ | ||
name: release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
rust: | ||
- stable | ||
os: | ||
- ubuntu:18.04 | ||
- almalinux:8.7 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: OS Build | ||
run: | | ||
export full_tgtname=${{ matrix.os }} | ||
export tgtname=$(echo ${{ matrix.os }} | tr -d ':') | ||
.github/scripts/gen_dockerfile.sh | ||
docker build ./ -t $tgtname | ||
shell: bash | ||
- name: Create package | ||
run: | | ||
export tgtname=$(echo ${{ matrix.os }} | tr -d ':') | ||
docker run \ | ||
-t --rm \ | ||
-v "$GITHUB_WORKSPACE:/source" \ | ||
$tgtname \ | ||
.github/scripts/build_spike_dasm.sh; | ||
.github/scripts/package.sh $tgtname; | ||
shell: bash | ||
- name: Get Artifact Name | ||
run: | | ||
ARTIFACT_PATHNAME=$(ls ./snitch-spike-dasm-*.tar.gz | head -n 1) | ||
ARTIFACT_NAME=$(basename $ARTIFACT_PATHNAME) | ||
echo "ARTIFACT_NAME=${ARTIFACT_NAME}" >> $GITHUB_ENV | ||
echo "ARTIFACT_PATHNAME=${ARTIFACT_PATHNAME}" >> $GITHUB_ENV | ||
shell: bash | ||
- name: Upload Release Asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: ${{ env.ARTIFACT_PATHNAME }} | ||
asset_name: ${{ env.ARTIFACT_NAME }} | ||
asset_content_type: application/tar.gz |
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 |
---|---|---|
|
@@ -5,3 +5,4 @@ autom4te.cache/ | |
*.o | ||
*.d | ||
.gdb_history | ||
Dockerfile |