Skip to content

Commit

Permalink
Update and rename linux_f2c.yml to make.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
AWehrhahn authored Dec 2, 2020
1 parent 940910e commit 0ccbebb
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/linux_f2c.yml → .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,20 @@ jobs:
- name: ubuntu-gfortran
runs_on: ubuntu-latest
packages: gfortran
outputs: lib share
- name: ubuntu-f2c
runs_on: ubuntu-latest
packages: f2c
outputs: lib share
- name: windows-gfortran
runs_on: ubuntu-latest
packages: gfortran mingw-w64 mingw-w64-tools mingw-w64-common gcc-mingw-w64 gcc-mingw-w64-x86-64 g++-mingw-w64 g++-mingw-w64-x86-64
target: win64
ldflags: -L${{ x86_64-w64-mingw32-gfortran --print-file-name= }}
cxx: x86_64-w64-mingw32-gcc
f77: x86_64-w64-mingw32-gfortran
config_flags: --build=x86_64-pc-linux-gnu --host=x86_64-w64-mingw32
outputs: bin share

# The CMake configure and build commands are platform agnostic and should work equally
# well on Windows or Mac. You can convert this to a matrix build if you need
Expand All @@ -56,6 +67,7 @@ jobs:
- uses: actions/checkout@v2

- name: Install packages
if: matrix.runs_on == 'ubuntu-latest'
run: sudo apt-get install -y ${{ matrix.packages }}

- name: Run F2C
Expand All @@ -67,15 +79,23 @@ jobs:
run: rm Makefile.am && mv Makefile_f2c.am Makefile.am

- name: Run Bootstrap and Configure
env:
CXX: ${{ matrix.cxx }}
F77: ${{ matrix.f77 }}
LDFLAGS: ${{ matrix.ldflags }}
shell: bash
run: ./bootstrap && ./configure --prefix=$PWD
run: ./bootstrap && ./configure --prefix=$PWD ${{ matrix.config_flags }}

- name: Install
# Execute the build. You can specify a specific target with "--target <NAME>"
env:
CXX: ${{ matrix.cxx }}
F77: ${{ matrix.f77 }}
LDFLAGS: ${{ matrix.ldflags }}
run: make install

- name: Zip data # This would actually build your project, using zip for an example artifact
run: zip -r ${{ matrix.name }} lib share
run: zip -r ${{ matrix.name }} ${{ matrix.outputs }}

- name: Archive compiled library
uses: actions/upload-artifact@v2
Expand Down

0 comments on commit 0ccbebb

Please sign in to comment.