Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
build linux from source
Browse files Browse the repository at this point in the history
  • Loading branch information
iantaylor-NOAA committed Sep 6, 2022
1 parent 7cc7f48 commit 5f9ee2a
Showing 1 changed file with 35 additions and 12 deletions.
47 changes: 35 additions & 12 deletions .github/workflows/build-ss3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
config:
- {os: windows-latest}
- {os: macos-latest}
- {os: ubuntu-22.04}
- {os: ubuntu-latest}
# Limit run time to 90 min to avoid wasting action minutes.
# was set to 15 and then 30 minutes previously, but compiling admb
# on mac took too long
Expand Down Expand Up @@ -66,13 +66,36 @@ jobs:
sudo chmod 755 /usr/local/bin/admb
echo "/usr/local/bin/admb" >> $GITHUB_PATH
- name: Get admb and put in path, linux
if: matrix.config.os == 'ubuntu-22.04'
- name: checkout admb, linux
if: matrix.config.os == 'ubuntu-latest'
uses: actions/checkout@v2
with:
repository: admb-project/admb
path: admb
ref: admb-13.0
- name: clean, linux
if: matrix.config.os == 'ubuntu-latest'
run: cd admb && make clean
- name: see where admb is, linux
if: matrix.config.os == 'ubuntu-latest'
run: |
ls
cd admb && ls
- name: compile admb, linux
if: matrix.config.os == 'ubuntu-latest'
run: |
wget https://github.com/admb-project/admb/releases/download/admb-13.0/admb-13.0-linux.zip
sudo unzip admb-13.0-linux.zip -d /usr/local/bin
sudo chmod 755 /usr/local/bin/admb-13.0/bin/admb
echo "/usr/local/bin/admb-13.0/bin" >> $GITHUB_PATH
cd admb && make
- name: see where admb is, linux
if: matrix.config.os == 'ubuntu-latest'
run: |
cd admb && ls -l
- name: put admb in path, linux
if: matrix.config.os == 'ubuntu-latest'
run: |
sudo mv admb /usr/local/bin
sudo chmod 755 /usr/local/bin/admb
echo "/usr/local/bin/admb" >> $GITHUB_PATH
- name: Set up R
uses: r-lib/actions/setup-r@v2
Expand Down Expand Up @@ -107,7 +130,7 @@ jobs:
- name: Get the last tag on unix
id: get-latest-tag-unix
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'ubuntu-22.04'
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'ubuntu-latest'
run: |
git tag
latest_tag=$(git describe --abbrev=0 --tags)
Expand All @@ -121,7 +144,7 @@ jobs:

- name: pull the last tag value to use in the Rscript on unix
id: get-version-unix
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'ubuntu-22.04'
if: matrix.config.os == 'macos-latest' || matrix.config.os == 'ubuntu-latest'
run: |
echo "${{ steps.get-latest-tag-unix.outputs.tag }}" > .github/last_tag.txt
echo "${{ steps.get-latest-tag-unix.outputs.tag_commit }}" > .github/last_tag_commit.txt
Expand Down Expand Up @@ -217,7 +240,7 @@ jobs:
/bin/bash ./Make_SS_330_new.sh -b SS330 -o
- name: Build stock synthesis for linux with p flag
if: matrix.config.os == 'ubuntu-22.04'
if: matrix.config.os == 'ubuntu-latest'
run: |
rm -rf SS330
rm -rf ss_osx.tar
Expand All @@ -240,13 +263,13 @@ jobs:
mv ss_opt ss_opt_osx
- name: Verify binary on linux
if: matrix.config.os == 'ubuntu-22.04'
if: matrix.config.os == 'ubuntu-latest'
run: |
sha256sum SS330/ss
sha256sum SS330/ss_opt
- name: Delete unneeded files and change exe names on linux
if: matrix.config.os == 'ubuntu-22.04'
if: matrix.config.os == 'ubuntu-latest'
run: |
cd SS330
rm *.obj *.htp *.cpp ss_opt.tpl ss.tpl
Expand Down

0 comments on commit 5f9ee2a

Please sign in to comment.