Skip to content

Commit

Permalink
try windows-2025 runner build-ss3.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
e-perl-NOAA authored Dec 19, 2024
1 parent dfde519 commit 1fed2ff
Showing 1 changed file with 26 additions and 25 deletions.
51 changes: 26 additions & 25 deletions .github/workflows/build-ss3.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
# Builds the stock synthesis executables for testing and distribution using the admb docker image.
# for macOS 12, and macos-14 (arm64 architecture), linux, Windows
# Runs on every push and PR (even draft PRs)
name: build-ss3

on:
push:
paths:
- '**.tpl'
- '**.sh'
# paths:
# - '**.tpl'
# - '**.sh'
workflow_dispatch:
workflow_run:
workflows: ["github-actions-runners-updates"]
types:
- completed


jobs:
build-ss3:
if: ${{ github.event_name == 'workflow_dispatch' || github.event == 'push' || github.event.workflow_run.conclusion == 'failure' }}
# if: ${{ github.event_name == 'workflow_dispatch' || github.event == 'push' || github.event.workflow_run.conclusion == 'failure' }}
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }}
strategy:
Expand All @@ -22,8 +23,8 @@ jobs:
- {os: windows-latest}
- {os: macos-13}
- {os: macos-latest}
- {os: macos-15}
- {os: ubuntu-latest}
- {os: windows-2025}
# 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 All @@ -47,7 +48,7 @@ jobs:
- name: Update Ubuntu packages
if: matrix.config.os == 'ubuntu-latest'
run: sudo apt-get update

- name: Setup R
uses: r-lib/actions/setup-r@v2

Expand All @@ -58,27 +59,27 @@ jobs:
# Build ADMB for macos-13
- name: Build ADMB for macos-13 and put in path
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15'
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest'
run: |
cd admb && make clean
- name: See where admb is
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15'
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest'
run: |
cd admb && ls
- name: Compile admb, macOS
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15'
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest'
run: |
cd admb && make -j 4
- name: Change permissions of admb and put in path, macOS
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15'
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest'
run: |
sudo mv admb /usr/local/bin
sudo chmod 755 /usr/local/bin/admb
echo "/usr/local/bin/admb" >> $GITHUB_PATH
- name: Get the last tag on Windows
id: get-latest-tag-win
if: matrix.config.os == 'windows-latest'
if: matrix.config.os == 'windows-latest' || matrix.config.os == 'windows-2025'
run: |
git tag
$latest_tag = (git describe --abbrev=0 --tags)
Expand All @@ -90,15 +91,15 @@ jobs:
- name: Pull the last tag value to use in the Rscript on Windows
id: get-version-win
if: matrix.config.os == 'windows-latest'
if: matrix.config.os == 'windows-latest' || matrix.config.os == 'windows-2025'
run: |
Out-File -InputObject ${{ steps.get-latest-tag-win.outputs.tag }} -FilePath .github/last_tag.txt
Out-File -InputObject ${{ steps.get-latest-tag-win.outputs.tag_commit }} -FilePath .github/last_tag_commit.txt
Out-File -InputObject ${{ steps.get-latest-tag-win.outputs.commit}} -FilePath .github/last_commit.txt
- name: Get the last tag on unix (macOS and linux)
id: get-latest-tag-unix
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15' || matrix.config.os == 'ubuntu-latest'
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'ubuntu-latest'
run: |
git tag
latest_tag=$(git describe --abbrev=0 --tags)
Expand All @@ -110,7 +111,7 @@ jobs:
- name: Pull the last tag value to use in the Rscript on unix (macOS and linux)
id: get-version-unix
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15' || matrix.config.os == 'ubuntu-latest'
if: matrix.config.os == 'macos-13' || 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 @@ -181,15 +182,15 @@ jobs:
shell: Rscript {0}

- name: Build stock synthesis for windows with admb docker image
if: matrix.config.os == 'windows-latest'
if: matrix.config.os == 'windows-latest' || matrix.config.os == 'windows-2025'
run: |
cd Compile
./Make_SS_fast.bat || true
./Make_SS_safe.bat || true
cd ..
- name: Move exes to a new folder on windows
if: matrix.config.os == 'windows-latest'
if: matrix.config.os == 'windows-latest' || matrix.config.os == 'windows-2025'
run: |
mkdir SS330
chmod 777 SS330
Expand All @@ -198,9 +199,8 @@ jobs:
mv SS330/ss3.exe SS330/ss3_win.exe
mv SS330/ss3_opt.exe SS330/ss3_opt_win.exe
- name: Build stock synthesis for mac with admb from source
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15'
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest'
run: |
rm -rf SS330
rm -rf ss3_osx.tar
Expand All @@ -210,7 +210,7 @@ jobs:
/bin/bash ./Make_SS_330_new.sh -b SS330 -o
# - name: Build stock synthesis for mac m2 with admb docker image
# if: matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15'
# if: matrix.config.os == 'macos-latest'
# run: |
# brew update
# brew install docker
Expand All @@ -226,13 +226,13 @@ jobs:
# /bin/bash ./Make_SS_330_new.sh --admb docker -b SS330 -o

- name: Verify binary on mac
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15'
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest'
run: |
shasum -a 256 SS330/ss3
shasum -a 256 SS330/ss3_opt
- name: Delete unneeded files and change exe names on mac
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest' || matrix.config.os == 'macos-15'
if: matrix.config.os == 'macos-13' || matrix.config.os == 'macos-latest'
run: |
cd SS330
rm *.obj *.htp *.cpp ss3_opt.tpl ss3.tpl
Expand Down Expand Up @@ -269,3 +269,4 @@ jobs:
with:
name: ss3-${{ matrix.config.os }}
path: SS330/

0 comments on commit 1fed2ff

Please sign in to comment.